合并上游代码
This commit is contained in:
commit
fe7947f7f6
|
@ -0,0 +1,36 @@
|
|||
### 议题类别
|
||||
<!-- 请勾选方框,在[]中加一个x且周围没有空格,如下所示:[x] -->
|
||||
|
||||
- [ ] 错误报告
|
||||
- [ ] 功能请求
|
||||
- [ ] 支持问题
|
||||
- [ ] 其他问题
|
||||
|
||||
## 议题描述
|
||||
|
||||
## 议题信息
|
||||
<!-- 包括所有可能有助于理解和重现问题的相关信息 -->
|
||||
|
||||
### 使用的命令或代码
|
||||
<!-- 需要什么命令或代码来重现问题? -->
|
||||
|
||||
### 使用的环境、平台、设备
|
||||
<!-- 您在什么环境、什么平台或什么设备上遇到问题? -->
|
||||
|
||||
|
||||
|
||||
### 版本信息
|
||||
<!--
|
||||
您正在使用哪些相关版本?
|
||||
例如: win64位,win32位
|
||||
-->
|
||||
|
||||
|
||||
|
||||
## 检查清单
|
||||
<!-- 请在`[]`中加一个`x`来勾选方框且周围没有空格,如下所示:`[x]` -->
|
||||
|
||||
- [ ] 此问题没有在其他issue(议题)中出现
|
||||
- [ ] 我已将无名杀本体更新为最新版本
|
||||
- [ ] 我已将所有扩展更新为最新版本
|
||||
- [ ] 我填写了上面所有必要的信息
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
name: 其他问题
|
||||
about: 其他问题
|
||||
---
|
||||
## 问题描述
|
||||
|
||||
## 问题信息
|
||||
<!-- 包括所有可能有助于理解和重现问题的相关信息 -->
|
||||
|
||||
### 使用的命令或代码
|
||||
<!-- 需要什么命令或代码来重现问题? -->
|
||||
|
||||
### 使用的环境、平台、设备
|
||||
<!-- 您在什么环境、什么平台或什么设备上遇到问题? -->
|
||||
|
||||
|
||||
|
||||
### 版本信息
|
||||
<!--
|
||||
您正在使用哪些相关版本?
|
||||
例如: win64位,win32位
|
||||
-->
|
||||
|
||||
|
||||
|
||||
## 检查清单
|
||||
<!-- 请在`[]`中加一个`x`来勾选方框且周围没有空格,如下所示:`[x]` -->
|
||||
|
||||
- [ ] 此问题没有在其他issue(议题)中出现
|
||||
- [ ] 我已将无名杀本体更新为最新版本
|
||||
- [ ] 我已将所有扩展更新为最新版本
|
||||
- [ ] 我填写了上面所有必要的信息
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
name: 功能请求
|
||||
about: 编写扩展或本体代码时,需要主分支来添加或修改某些功能代码的实现
|
||||
---
|
||||
## 功能描述
|
||||
|
||||
## 功能信息
|
||||
<!-- 包括所有可能有助于理解和重现问题的相关信息 -->
|
||||
|
||||
### 使用的环境、平台、设备
|
||||
<!-- 您在什么环境、什么平台或什么设备上遇到问题? -->
|
||||
|
||||
|
||||
|
||||
### 版本信息
|
||||
<!--
|
||||
您正在使用哪些相关版本?
|
||||
例如: win64位,win32位
|
||||
-->
|
||||
|
||||
|
||||
|
||||
## 检查清单
|
||||
<!-- 请在`[]`中加一个`x`来勾选方框且周围没有空格,如下所示:`[x]` -->
|
||||
|
||||
- [ ] 此问题没有在其他issue(议题)中出现
|
||||
- [ ] 我已将无名杀本体更新为最新版本
|
||||
- [ ] 我已将所有扩展更新为最新版本
|
||||
- [ ] 我填写了上面所有必要的信息
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
name: 支持问题
|
||||
about: 某些接口对客户端的兼容性有问题
|
||||
---
|
||||
## 问题描述
|
||||
|
||||
## 问题信息
|
||||
<!-- 包括所有可能有助于理解和重现问题的相关信息 -->
|
||||
|
||||
### 使用的命令或代码
|
||||
<!-- 需要什么命令或代码来重现问题? -->
|
||||
|
||||
### 使用的环境、平台、设备
|
||||
<!-- 您在什么环境、什么平台或什么设备上遇到问题? -->
|
||||
|
||||
|
||||
|
||||
### 版本信息
|
||||
<!--
|
||||
您正在使用哪些相关版本?
|
||||
例如: win64位,win32位
|
||||
-->
|
||||
|
||||
|
||||
|
||||
## 检查清单
|
||||
<!-- 请在`[]`中加一个`x`来勾选方框且周围没有空格,如下所示:`[x]` -->
|
||||
|
||||
- [ ] 此问题没有在其他issue(议题)中出现
|
||||
- [ ] 我已将无名杀本体更新为最新版本
|
||||
- [ ] 我已将所有扩展更新为最新版本
|
||||
- [ ] 我填写了上面所有必要的信息
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
name: 错误报告
|
||||
about: 游戏中遇到的错误弹窗,或是遇到技能卡牌结算不对
|
||||
---
|
||||
## 错误描述
|
||||
|
||||
## 错误信息
|
||||
<!-- 包括所有可能有助于理解和重现问题的相关信息 -->
|
||||
|
||||
### 使用的命令或代码
|
||||
<!-- 需要什么命令或代码来重现问题? -->
|
||||
|
||||
### 使用的环境、平台、设备
|
||||
<!-- 您在什么环境、什么平台或什么设备上遇到问题? -->
|
||||
|
||||
|
||||
|
||||
### 版本信息
|
||||
<!--
|
||||
您正在使用哪些相关版本?
|
||||
例如: win64位,win32位
|
||||
-->
|
||||
|
||||
|
||||
|
||||
## 检查清单
|
||||
<!-- 请在`[]`中加一个`x`来勾选方框且周围没有空格,如下所示:`[x]` -->
|
||||
|
||||
- [ ] 此问题没有在其他issue(议题)中出现
|
||||
- [ ] 我已将无名杀本体更新为最新版本
|
||||
- [ ] 我已将所有扩展更新为最新版本
|
||||
- [ ] 我填写了上面所有必要的信息
|
|
@ -0,0 +1,34 @@
|
|||
<!-- 在提交PR之前,请确保检查清单框都经过了检查 -->
|
||||
|
||||
### PR受影响的平台
|
||||
<!-- PR的内容涉及到哪些客户端? 浏览器端,电脑端(win, mac), 手机端(android, ios, other)或者是所有平台 -->
|
||||
|
||||
|
||||
### 诱因和背景
|
||||
<!-- 为什么需要进行此更改?它解决了什么问题? -->
|
||||
<!-- 如果它修复了一个未解决的issue,请在此处链接到该issue。 -->
|
||||
|
||||
|
||||
|
||||
### PR描述
|
||||
<!-- 详细描述您的更改 -->
|
||||
|
||||
|
||||
|
||||
### PR测试
|
||||
<!-- 请详细描述您是如何测试PR中更改的代码的? -->
|
||||
|
||||
|
||||
|
||||
### 扩展适配
|
||||
<!-- 如果此PR需要相当一部分扩展进行跟进或者需要UI扩展更新,请在此写出扩展跟进代码 -->
|
||||
|
||||
|
||||
|
||||
### 检查清单
|
||||
<!-- 请在`[]`中加一个`x`来勾选方框且周围没有空格,如下所示:`[x]` -->
|
||||
- [ ] 我已经进行了充足的测试,且现有的测试都已通过
|
||||
- [ ] 如果此次PR涉及到新功能的添加,我已在`PR描述`中写入详细文档
|
||||
- [ ] 如果此次PR需要扩展跟进,我已在`扩展适配`中写入详细文档
|
||||
- [ ] 如果这个PR解决了一个issue,我在`诱因和背景`中明确链接到该issue
|
||||
- [ ] 我保证该PR中没有随意修改换行符等内容,没有制造出大量的Diff
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -229,9 +229,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
ai:{
|
||||
basic:{
|
||||
order:4,
|
||||
order:9.2,
|
||||
value:[3,1],
|
||||
useful:1,
|
||||
useful:0.6,
|
||||
},
|
||||
wuxie:function(target,card,player,viewer,status){
|
||||
if(get.attitude(viewer,player._trueMe||player)>0) return 0;
|
||||
|
@ -577,7 +577,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
player.loseToSpecial(cards,'muniu');
|
||||
"step 1"
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(cards[i].destroyed||!cards[i].hasGaintag('muniu')||get.position(cards[i])!='s'){
|
||||
if(cards[i]._selfDestroyed||!cards[i].hasGaintag('muniu')||get.position(cards[i])!='s'){
|
||||
cards[i].remove();
|
||||
cards.splice(i--,1);
|
||||
}
|
||||
|
@ -648,7 +648,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
intro:{
|
||||
content:function(storage,player){
|
||||
var muniu=player.getEquip('muniu');
|
||||
if(!muniu||!muniu.cards||!muniu.cards.length) return '共有〇张牌';
|
||||
if(!muniu||!muniu.cards||!muniu.cards.length) return '共有零张牌';
|
||||
if(player.isUnderControl(true)){
|
||||
return get.translation(muniu.cards);
|
||||
}
|
||||
|
@ -658,7 +658,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mark:function(dialog,storage,player){
|
||||
var muniu=player.getEquip('muniu');
|
||||
if(!muniu||!muniu.cards||!muniu.cards.length) return '共有〇张牌';
|
||||
if(!muniu||!muniu.cards||!muniu.cards.length) return '共有零张牌';
|
||||
if(player.isUnderControl(true)){
|
||||
dialog.addAuto(muniu.cards);
|
||||
}
|
||||
|
|
|
@ -435,7 +435,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
player.logSkill('taipingyaoshu');
|
||||
player.draw(2);
|
||||
'step 1'
|
||||
if(player.hp>1||get.mode()=='guozhan') player.loseHp();
|
||||
if(player.hp>1) player.loseHp();
|
||||
}
|
||||
},
|
||||
yuxi:{
|
||||
|
@ -1095,30 +1095,42 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
target.chooseToDiscard(2,'he',true).ai=get.disvalue;
|
||||
},
|
||||
ai:{
|
||||
wuxie:function(){
|
||||
wuxie: function () {
|
||||
return 0;
|
||||
},
|
||||
basic:{
|
||||
useful:3,
|
||||
value:3,
|
||||
order:5
|
||||
basic: {
|
||||
order: 9,
|
||||
useful: 1.5,
|
||||
value: 3
|
||||
},
|
||||
result:{
|
||||
target:function(player,target){
|
||||
var hs=target.getCards('h');
|
||||
if(hs.length<=1){
|
||||
if(target==player&&(hs.length==0||hs[0].name=='yiyi')){
|
||||
return 0;
|
||||
result: {
|
||||
target(player, target) {
|
||||
let i,
|
||||
add = 0,
|
||||
y = 1,
|
||||
tars = 0;
|
||||
if (!ui.selected.cards) y = 0;
|
||||
if (ui.selected.targets) tars = 0.01 * ui.selected.targets.length;
|
||||
else tars = 0;
|
||||
if (target == player) i = player.countCards('h', function (card) {
|
||||
if (y > 0 && ui.selected.cards.includes(card)) return false;
|
||||
if (!y && get.name(card) === 'yiyi') {
|
||||
y = -1;
|
||||
return false;
|
||||
}
|
||||
return 0.3;
|
||||
}
|
||||
return Math.sqrt(target.countCards('he'));
|
||||
},
|
||||
return true;
|
||||
});
|
||||
else i = target.countCards('he');
|
||||
if (target.hasSkillTag('noh')) add++;
|
||||
return add + Math.sqrt(i / 3.6 + tars) / 2;
|
||||
}
|
||||
},
|
||||
tag:{
|
||||
loseCard:1,
|
||||
discard:1,
|
||||
norepeat:1
|
||||
tag: {
|
||||
draw: 2,
|
||||
loseCard: 2,
|
||||
discard: 2,
|
||||
multitarget: true,
|
||||
norepeat: 1
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -1843,7 +1855,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
feilongduofeng_info:'①当你使用【杀】指定目标后,你可令目标角色弃置一张牌。②当你因使用【杀】而令其他角色进入濒死状态时,你可以获得其一张手牌。',
|
||||
taipingyaoshu:'太平要术',
|
||||
taipingyaoshu_info:'锁定技。①当你即将受到属性伤害时,取消之。②你的手牌上限+X(X为场上势力数-1)。③当你失去装备区里的【太平要术】时,你摸两张牌,然后若你的体力值大于1,你失去1点体力。',
|
||||
taipingyaoshu_info_guozhan:'锁定技。①当你即将受到属性伤害时,取消之。②你的手牌上限+X(X为与你势力相同的角色数)。③当你失去装备区里的【太平要术】时,你摸两张牌,然后你失去1点体力。',
|
||||
taipingyaoshu_info_guozhan:'锁定技。①当你即将受到属性伤害时,取消之。②你的手牌上限+X(X为与你势力相同的角色数)。③当你失去装备区里的【太平要术】时,你摸两张牌,然后若你的体力值大于1,你失去1点体力。',
|
||||
yuxi_skill:'玉玺',
|
||||
yuxi_skill2:'玉玺',
|
||||
yuxi:'玉玺',
|
||||
|
|
|
@ -369,7 +369,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
useful:4,
|
||||
value:10,
|
||||
tag:{
|
||||
draw:2
|
||||
draw:3,
|
||||
discard:1
|
||||
},
|
||||
result:{
|
||||
target:function(player,target){
|
||||
|
|
453
card/standard.js
453
card/standard.js
|
@ -157,11 +157,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(target.hasSkillTag('useShan',null,event)) return true;
|
||||
if(target.isLinked()&&game.hasNature(event.card)&&get.attitude(target,player._trueMe||player)>0) return false;
|
||||
if(event.baseDamage+event.extraDamage<=0&&!game.hasNature(event.card,'ice')) return false;
|
||||
if(target.hasSkillTag('freeShan',false,event,true)) return true;
|
||||
if(event.shanRequired>1&&target.mayHaveShan(target,'use',null,'count')<event.shanRequired-(event.shanIgnored||0)) return false;
|
||||
if(event.baseDamage+event.extraDamage>=target.hp+
|
||||
((player.hasSkillTag('jueqing',false,target)||target.hasSkill('gangzhi'))?target.hujia:0)) return true;
|
||||
if(!game.hasNature(event.card,'ice')&&get.damageEffect(target,player,target,get.nature(event.card))>=0) return false;
|
||||
if(event.shanRequired>1&&target.mayHaveShan(target,'use',null,'count')<event.shanRequired-(event.shanIgnored||0)) return false;
|
||||
return true;
|
||||
})());
|
||||
//next.autochoose=lib.filter.autoRespondShan;
|
||||
|
@ -272,17 +271,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
useful:[5,3,1],
|
||||
value:[5,3,1],
|
||||
},
|
||||
order:function(item,player){
|
||||
if(player.hasSkillTag('presha',true,null,true)) return 10;
|
||||
if(typeof item==='object'&&game.hasNature(item,'linked')){
|
||||
if(game.hasPlayer(function(current){
|
||||
return current!=player&&lib.card.sha.ai.canLink(player,current,item)&&player.canUse(item,current,null,true)&&get.effect(current,item,player,player)>0;
|
||||
})&&game.countPlayer(function(current){
|
||||
return current.isLinked()&&get.damageEffect(current,player,player,get.nature(item))>0;
|
||||
})>1) return 3.1;
|
||||
return 3;
|
||||
}
|
||||
return 3.05;
|
||||
order(item, player) {
|
||||
let res = 3.2;
|
||||
if (player.hasSkillTag('presha', true, null, true)) res = 10;
|
||||
if (typeof item !== 'object' || !game.hasNature(item, 'linked') || game.countPlayer(cur => cur.isLinked()) < 2) return res;
|
||||
//let used = player.getCardUsable('sha') - 1.5, natures = ['thunder', 'fire', 'ice', 'kami'];
|
||||
let uv = player.getUseValue(item, true);
|
||||
if (uv <= 0) return res;
|
||||
let temp = player.getUseValue('sha', true) - uv;
|
||||
if (temp < 0) return res + 0.15;
|
||||
if (temp > 0) return res - 0.15;
|
||||
return res;
|
||||
},
|
||||
result:{
|
||||
target:function(player,target,card,isLink){
|
||||
|
@ -469,14 +468,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return 2;
|
||||
},
|
||||
target_use:(player,target,card)=>{
|
||||
if(player===_status.currentPhase&&player.hasSkillTag('nokeep',true,{
|
||||
card:card,
|
||||
target:target
|
||||
},true)) return 2;
|
||||
let mode = get.mode(),
|
||||
taos = player.getCards('hs',i=>get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable'));
|
||||
if(target.hp>0){
|
||||
if(!player.isPhaseUsing()) return 0;
|
||||
if(target!==_status.event.dying){
|
||||
if(!player.isPhaseUsing() || player.hasSkillTag('nokeep',true,{
|
||||
card:card,
|
||||
target:target
|
||||
},true)) return 2;
|
||||
let min = 7.2-4*player.hp/player.maxHp,
|
||||
nd = player.needsToDiscard(0,(i,player)=>{
|
||||
return !player.canIgnoreHandcard(i)&&(taos.includes(i)||get.value(i)>=min);
|
||||
|
@ -995,43 +993,171 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
ai:{
|
||||
wuxie:function(target,card,player,viewer){
|
||||
if(get.attitude(viewer,target)>0&&target.countCards('h','sha')){
|
||||
if(!target.countCards('h')||target.hp==1||Math.random()<0.7) return 0;
|
||||
wuxie(target, card, player, viewer, status) {
|
||||
let att = get.attitude(viewer, target), eff = get.effect(target, card, player, target);
|
||||
if (Math.abs(att) < 1 || status * eff * att >= 0) return 0;
|
||||
let evt = _status.event.getParent('useCard'), pri = 1, bonus = player.hasSkillTag('damageBonus', true, {
|
||||
target: target,
|
||||
card: card
|
||||
}), damage = 1, isZhu = function (tar) {
|
||||
return tar.isZhu || tar === game.boss || tar === game.trueZhu || tar === game.falseZhu;
|
||||
}, canSha = function (tar, blur) {
|
||||
let known = tar.getKnownCards(viewer);
|
||||
if (!blur) return known.some(card => {
|
||||
let name = get.name(card, tar);
|
||||
return (name === 'sha' || name === 'hufu' || name === 'yuchanqian') && lib.filter.cardRespondable(card, tar);
|
||||
});
|
||||
if (tar.countCards('hs', i => !known.includes(i)) > 4.67 - 2 * tar.hp / tar.maxHp) return true;
|
||||
if (!tar.hasSkillTag('respondSha', true, 'respond', true)) return false;
|
||||
if (tar.hp <= damage) return false;
|
||||
if (tar.hp <= damage + 1) return isZhu(tar);
|
||||
return true;
|
||||
}, self = false;
|
||||
if (canSha(target)) return 0;
|
||||
if (bonus && !viewer.hasSkillTag('filterDamage', null, {
|
||||
player: player,
|
||||
card: card
|
||||
})) damage = 2;
|
||||
if ((viewer.hp <= damage || viewer.hp <= damage + 1 && isZhu(viewer)) && !canSha(viewer)) {
|
||||
if (viewer === target) return status;
|
||||
let fv = true;
|
||||
if (evt && evt.targets) for (let i of evt.targets) {
|
||||
if (fv) {
|
||||
if (target === i) fv = false;
|
||||
continue;
|
||||
}
|
||||
if (viewer == i) {
|
||||
if (isZhu(viewer)) return 0;
|
||||
self = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
let maySha = canSha(target, true);
|
||||
if (bonus && !target.hasSkillTag('filterDamage', null, {
|
||||
player: player,
|
||||
card: card
|
||||
})) damage = 2;
|
||||
else damage = 1;
|
||||
if (isZhu(target)) {
|
||||
if (eff < 0) {
|
||||
if (target.hp <= damage + 1 || !maySha && target.hp <= damage + 2) return 1;
|
||||
if (maySha && target.hp > damage + 2) return 0;
|
||||
else if (maySha || target.hp > damage + 2) pri = 3;
|
||||
else pri = 4;
|
||||
}
|
||||
else if (target.hp > damage + 1) pri = 2;
|
||||
else return 0;
|
||||
}
|
||||
else if (self) return 0;
|
||||
else if (eff < 0) {
|
||||
if (!maySha && target.hp <= damage) pri = 5;
|
||||
else if (maySha) return 0;
|
||||
else if (target.hp > damage + 1) pri = 2;
|
||||
else if (target.hp === damage + 1) pri = 3;
|
||||
else pri = 4;
|
||||
}
|
||||
else if (target.hp <= damage) return 0;
|
||||
let find = false;
|
||||
if (evt && evt.targets) for (let i = 0; i < evt.targets.length; i++) {
|
||||
if (!find) {
|
||||
if (evt.targets[i] === target) find = true;
|
||||
continue;
|
||||
}
|
||||
let att1 = get.attitude(viewer, evt.targets[i]), eff1 = get.effect(evt.targets[i], card, player, evt.targets[i]), temp = 1;
|
||||
if (Math.abs(att1) < 1 || att1 * eff1 >= 0 || canSha(evt.targets[i])) continue;
|
||||
maySha = canSha(evt.targets[i], true);
|
||||
if (bonus && !evt.targets[i].hasSkillTag('filterDamage', null, {
|
||||
player: player,
|
||||
card: card
|
||||
})) damage = 2;
|
||||
else damage = 1;
|
||||
if (isZhu(evt.targets[i])) {
|
||||
if (eff1 < 0) {
|
||||
if (evt.targets[i].hp <= damage + 1 || !maySha && evt.targets[i].hp <= damage + 2) return 0;
|
||||
if (maySha && evt.targets[i].hp > damage + 2) continue;
|
||||
if (maySha || evt.targets[i].hp > damage + 2) temp = 3;
|
||||
else temp = 4;
|
||||
}
|
||||
else if (evt.targets[i].hp > damage + 1) temp = 2;
|
||||
else continue;
|
||||
}
|
||||
else if (eff1 < 0) {
|
||||
if (!maySha && evt.targets[i].hp <= damage) temp = 5;
|
||||
else if (maySha) continue;
|
||||
else if (evt.targets[i].hp > damage + 1) temp = 2;
|
||||
else if (evt.targets[i].hp === damage + 1) temp = 3;
|
||||
else temp = 4;
|
||||
}
|
||||
else if (evt.targets[i].hp > damage + 1) temp = 2;
|
||||
if (temp > pri) return 0;
|
||||
}
|
||||
return 1;
|
||||
},
|
||||
basic: {
|
||||
order: 9,
|
||||
useful: [5, 1],
|
||||
value: 5
|
||||
},
|
||||
result: {
|
||||
player(player, target) {
|
||||
if (player._nanman_temp || player.hasSkillTag('jueqing', false, target)) return 0;
|
||||
player._nanman_temp = true;
|
||||
let eff = get.effect(target, new lib.element.VCard({ name: 'nanman' }), player, target);
|
||||
delete player._nanman_temp;
|
||||
if (eff >= 0) return 0;
|
||||
if (target.hp > 2 || target.hp > 1 && !target.isZhu && target != game.boss && target != game.trueZhu && target != game.falseZhu) return 0;
|
||||
if (target.hp > 1 && target.hasSkillTag('respondSha', true, 'respond', true)) return 0;
|
||||
let known = target.getKnownCards(player);
|
||||
if (known.some(card => {
|
||||
let name = get.name(card, target);
|
||||
if (name === 'sha' || name === 'hufu' || name === 'yuchanqian') return lib.filter.cardRespondable(card, target);
|
||||
if (name === 'wuxie') return lib.filter.cardEnabled(card, target, 'forceEnable');
|
||||
})) return 0;
|
||||
if (target.hp > 1 || target.countCards('hs', i => !known.includes(i)) > 4.67 - 2 * target.hp / target.maxHp) return 0;
|
||||
let res = 0, att = get.sgnAttitude(player, target);
|
||||
res -= att * (0.8 * target.countCards('hs') + 0.6 * target.countCards('e') + 3.6);
|
||||
if (get.mode() === 'identity' && target.identity === 'fan') res += 2.4;
|
||||
if (get.mode() === 'guozhan' && player.identity !== 'ye' && player.identity === target.identity ||
|
||||
get.mode() === 'identity' && player.identity === 'zhu' && (target.identity === 'zhong' || target.identity === 'mingzhong')) res -= 0.8 * player.countCards('he');
|
||||
return res;
|
||||
},
|
||||
target(player, target) {
|
||||
let zhu = (get.mode() === 'identity' && target.isZhu) || target.identity === 'zhu';
|
||||
if (!lib.filter.cardRespondable({ name: 'sha' }, target)) {
|
||||
if (zhu) {
|
||||
if (target.hp < 2) return -99;
|
||||
if (target.hp === 2) return -3.6;
|
||||
}
|
||||
return -2;
|
||||
}
|
||||
let known = target.getKnownCards(player);
|
||||
if (known.some(card => {
|
||||
let name = get.name(card, target);
|
||||
if (name === 'sha' || name === 'hufu' || name === 'yuchanqian') return lib.filter.cardRespondable(card, target);
|
||||
if (name === 'wuxie') return lib.filter.cardEnabled(card, target, 'forceEnable');
|
||||
})) return -1.2;
|
||||
let nh = target.countCards('hs', i => !known.includes(i));
|
||||
if (zhu && target.hp <= 1) {
|
||||
if (nh === 0) return -99;
|
||||
if (nh === 1) return -60;
|
||||
if (nh === 2) return -36;
|
||||
if (nh === 3) return -12;
|
||||
if (nh === 4) return -8;
|
||||
return -5;
|
||||
}
|
||||
if (target.hasSkillTag('respondSha', true, 'respond', true)) return -1.35;
|
||||
if (!nh) return -2;
|
||||
if (nh === 1) return -1.8;
|
||||
return -1.5;
|
||||
}
|
||||
},
|
||||
basic:{
|
||||
order:9,
|
||||
useful:[5,1],
|
||||
value:5
|
||||
},
|
||||
result:{
|
||||
target_use:function(player,target){
|
||||
if(player.hasUnknown(2)&&get.mode()!='guozhan') return 0;
|
||||
var nh=target.countCards('h');
|
||||
if(get.mode()=='identity'){
|
||||
if(target.isZhu&&nh<=2&&target.hp<=1) return -100;
|
||||
}
|
||||
if(nh==0) return -2;
|
||||
if(nh==1) return -1.7
|
||||
return -1.5;
|
||||
},
|
||||
target:function(player,target){
|
||||
var nh=target.countCards('h');
|
||||
if(get.mode()=='identity'){
|
||||
if(target.isZhu&&nh<=2&&target.hp<=1) return -100;
|
||||
}
|
||||
if(nh==0) return -2;
|
||||
if(nh==1) return -1.7
|
||||
return -1.5;
|
||||
},
|
||||
},
|
||||
tag:{
|
||||
respond:1,
|
||||
respondSha:1,
|
||||
damage:1,
|
||||
multitarget:1,
|
||||
multineg:1,
|
||||
tag: {
|
||||
respond: 1,
|
||||
respondSha: 1,
|
||||
damage: 1,
|
||||
multitarget: 1,
|
||||
multineg: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1079,43 +1205,170 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
ai:{
|
||||
wuxie:function(target,card,player,viewer){
|
||||
if(get.attitude(viewer,target)>0&&target.countCards('h','shan')){
|
||||
if(!target.countCards('h')||target.hp==1||Math.random()<0.7) return 0;
|
||||
wuxie(target, card, player, viewer, status) {
|
||||
let att = get.attitude(viewer, target), eff = get.effect(target, card, player, target);
|
||||
if (Math.abs(att) < 1 || status * eff * att >= 0) return 0;
|
||||
let evt = _status.event.getParent('useCard'), pri = 1, bonus = player.hasSkillTag('damageBonus', true, {
|
||||
target: target,
|
||||
card: card
|
||||
}), damage = 1, isZhu = function (tar) {
|
||||
return tar.isZhu || tar === game.boss || tar === game.trueZhu || tar === game.falseZhu;
|
||||
}, canShan = function (tar, blur) {
|
||||
let known = tar.getKnownCards(viewer);
|
||||
if (!blur) return known.some(card => {
|
||||
let name = get.name(card, tar);
|
||||
return (name === 'shan' || name === 'hufu') && lib.filter.cardRespondable(card, tar);
|
||||
});
|
||||
if (tar.countCards('hs', i => !known.includes(i)) > 3.67 - 2 * tar.hp / tar.maxHp) return true;
|
||||
if (!tar.hasSkillTag('respondShan', true, 'respond', true)) return false;
|
||||
if (tar.hp <= damage) return false;
|
||||
if (tar.hp <= damage + 1) return isZhu(tar);
|
||||
return true;
|
||||
}, self = false;
|
||||
if (canShan(target)) return 0;
|
||||
if (bonus && !viewer.hasSkillTag('filterDamage', null, {
|
||||
player: player,
|
||||
card: card
|
||||
})) damage = 2;
|
||||
if ((viewer.hp <= damage || viewer.hp <= damage + 1 && isZhu(viewer)) && !canShan(viewer)) {
|
||||
if (viewer === target) return status;
|
||||
let fv = true;
|
||||
if (evt && evt.targets) for (let i of evt.targets) {
|
||||
if (fv) {
|
||||
if (target === i) fv = false;
|
||||
continue;
|
||||
}
|
||||
if (viewer == i) {
|
||||
if (isZhu(viewer)) return 0;
|
||||
self = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
let mayShan = canShan(target, true);
|
||||
if (bonus && !target.hasSkillTag('filterDamage', null, {
|
||||
player: player,
|
||||
card: card
|
||||
})) damage = 2;
|
||||
else damage = 1;
|
||||
if (isZhu(target)) {
|
||||
if (eff < 0) {
|
||||
if (target.hp <= damage + 1 || !mayShan && target.hp <= damage + 2) return 1;
|
||||
if (mayShan && target.hp > damage + 2) return 0;
|
||||
else if (mayShan || target.hp > damage + 2) pri = 3;
|
||||
else pri = 4;
|
||||
}
|
||||
else if (target.hp > damage + 1) pri = 2;
|
||||
else return 0;
|
||||
}
|
||||
else if (self) return 0;
|
||||
else if (eff < 0) {
|
||||
if (!mayShan && target.hp <= damage) pri = 5;
|
||||
else if (mayShan) return 0;
|
||||
else if (target.hp > damage + 1) pri = 2;
|
||||
else if (target.hp === damage + 1) pri = 3;
|
||||
else pri = 4;
|
||||
}
|
||||
else if (target.hp <= damage) return 0;
|
||||
let find = false;
|
||||
if (evt && evt.targets) for (let i = 0; i < evt.targets.length; i++) {
|
||||
if (!find) {
|
||||
if (evt.targets[i] === target) find = true;
|
||||
continue;
|
||||
}
|
||||
let att1 = get.attitude(viewer, evt.targets[i]), eff1 = get.effect(evt.targets[i], card, player, evt.targets[i]), temp = 1;
|
||||
if (Math.abs(att1) < 1 || att1 * eff1 >= 0 || canShan(evt.targets[i])) continue;
|
||||
mayShan = canShan(evt.targets[i], true);
|
||||
if (bonus && !evt.targets[i].hasSkillTag('filterDamage', null, {
|
||||
player: player,
|
||||
card: card
|
||||
})) damage = 2;
|
||||
else damage = 1;
|
||||
if (isZhu(evt.targets[i])) {
|
||||
if (eff1 < 0) {
|
||||
if (evt.targets[i].hp <= damage + 1 || !mayShan && evt.targets[i].hp <= damage + 2) return 0;
|
||||
if (mayShan && evt.targets[i].hp > damage + 2) continue;
|
||||
if (mayShan || evt.targets[i].hp > damage + 2) temp = 3;
|
||||
else temp = 4;
|
||||
}
|
||||
else if (evt.targets[i].hp > damage + 1) temp = 2;
|
||||
else continue;
|
||||
}
|
||||
else if (eff1 < 0) {
|
||||
if (!mayShan && evt.targets[i].hp <= damage) temp = 5;
|
||||
else if (mayShan) continue;
|
||||
else if (evt.targets[i].hp > damage + 1) temp = 2;
|
||||
else if (evt.targets[i].hp === damage + 1) temp = 3;
|
||||
else temp = 4;
|
||||
}
|
||||
else if (evt.targets[i].hp > damage + 1) temp = 2;
|
||||
if (temp > pri) return 0;
|
||||
}
|
||||
return 1;
|
||||
},
|
||||
basic: {
|
||||
order: 9,
|
||||
useful: 1,
|
||||
value: 5
|
||||
},
|
||||
result: {
|
||||
player(player, target) {
|
||||
if (player._wanjian_temp || player.hasSkillTag('jueqing', false, target)) return 0;
|
||||
player._wanjian_temp = true;
|
||||
let eff = get.effect(target, new lib.element.VCard({ name: 'wanjian' }), player, target);
|
||||
delete player._wanjian_temp;
|
||||
if (eff >= 0) return 0;
|
||||
if (target.hp > 2 || target.hp > 1 && !target.isZhu && target != game.boss && target != game.trueZhu && target != game.falseZhu) return 0;
|
||||
if (target.hp > 1 && target.hasSkillTag('respondShan', true, 'respond', true)) return 0;
|
||||
let known = target.getKnownCards(player);
|
||||
if (known.some(card => {
|
||||
let name = get.name(card, target);
|
||||
if (name === 'shan' || name === 'hufu') return lib.filter.cardRespondable(card, target);
|
||||
if (name === 'wuxie') return lib.filter.cardEnabled(card, target, 'forceEnable');
|
||||
})) return 0;
|
||||
if (target.hp > 1 || target.countCards('hs', i => !known.includes(i)) > 3.67 - 2 * target.hp / target.maxHp) return 0;
|
||||
let res = 0, att = get.sgnAttitude(player, target);
|
||||
res -= att * (0.8 * target.countCards('hs') + 0.6 * target.countCards('e') + 3.6);
|
||||
if (get.mode() === 'identity' && target.identity === 'fan') res += 2.4;
|
||||
if (get.mode() === 'guozhan' && player.identity !== 'ye' && player.identity === target.identity ||
|
||||
get.mode() === 'identity' && player.identity === 'zhu' && (target.identity === 'zhong' || target.identity === 'mingzhong')) res -= 0.8 * player.countCards('he');
|
||||
return res;
|
||||
},
|
||||
target(player, target) {
|
||||
let zhu = (get.mode() === 'identity' && target.isZhu) || target.identity === 'zhu';
|
||||
if (!lib.filter.cardRespondable({ name: 'shan' }, target)) {
|
||||
if (zhu) {
|
||||
if (target.hp < 2) return -99;
|
||||
if (target.hp === 2) return -3.6;
|
||||
}
|
||||
return -2;
|
||||
}
|
||||
let known = target.getKnownCards(player);
|
||||
if (known.some(card => {
|
||||
let name = get.name(card, target);
|
||||
if (name === 'shan' || name === 'hufu') return lib.filter.cardRespondable(card, target);
|
||||
if (name === 'wuxie') return lib.filter.cardEnabled(card, target, 'forceEnable');
|
||||
})) return -1.2;
|
||||
let nh = target.countCards('hs', i => !known.includes(i));
|
||||
if (zhu && target.hp <= 1) {
|
||||
if (nh === 0) return -99;
|
||||
if (nh === 1) return -60;
|
||||
if (nh === 2) return -36;
|
||||
if (nh === 3) return -8;
|
||||
return -5;
|
||||
}
|
||||
if (target.hasSkillTag('respondShan', true, 'respond', true)) return -1.35;
|
||||
if (!nh) return -2;
|
||||
if (nh === 1) return -1.65;
|
||||
return -1.5;
|
||||
}
|
||||
},
|
||||
basic:{
|
||||
order:9,
|
||||
useful:1,
|
||||
value:5
|
||||
},
|
||||
result:{
|
||||
target_use:function(player,target){
|
||||
if(player.hasUnknown(2)&&get.mode()!='guozhan') return 0;
|
||||
var nh=target.countCards('h');
|
||||
if(get.mode()=='identity'){
|
||||
if(target.isZhu&&nh<=2&&target.hp<=1) return -100;
|
||||
}
|
||||
if(nh==0) return -2;
|
||||
if(nh==1) return -1.7
|
||||
return -1.5;
|
||||
},
|
||||
target:function(player,target){
|
||||
var nh=target.countCards('h');
|
||||
if(get.mode()=='identity'){
|
||||
if(target.isZhu&&nh<=2&&target.hp<=1) return -100;
|
||||
}
|
||||
if(nh==0) return -2;
|
||||
if(nh==1) return -1.7
|
||||
return -1.5;
|
||||
},
|
||||
},
|
||||
tag:{
|
||||
respond:1,
|
||||
respondShan:1,
|
||||
damage:1,
|
||||
multitarget:1,
|
||||
multineg:1,
|
||||
tag: {
|
||||
respond: 1,
|
||||
respondShan: 1,
|
||||
damage: 1,
|
||||
multitarget: 1,
|
||||
multineg: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1281,7 +1534,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if (get.damageEffect(target, player, target) >= 0) return 0;
|
||||
let pd = get.damageEffect(player, target, player), att = get.attitude(player, target);
|
||||
if (att > 0 && get.damageEffect(target, player, player) > pd) return 0;
|
||||
let ts = target.mayHaveSha(player, 'respond', null, 'count'), ps = player.mayHaveSha(player, 'respond', null, 'count');
|
||||
let ts = target.mayHaveSha(player, 'respond', null, 'count'), ps = player.mayHaveSha(player, 'respond', player.getCards('h', i => {
|
||||
return card === i || card.cards && card.cards.includes(i) || ui.selected.cards.includes(i);
|
||||
}), 'count');
|
||||
if (ts < 1 && ts << 3 < Math.pow(player.hp, 2)) return 0;
|
||||
if (att > 0) {
|
||||
if (ts < 1) return 0;
|
||||
|
@ -1300,7 +1555,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if (td >= 0) return td / get.attitude(target, target);
|
||||
let pd = get.damageEffect(player, target, player), att = get.attitude(player, target);
|
||||
if (att > 0 && get.damageEffect(target, player, player) > pd) return -2;
|
||||
let ts = target.mayHaveSha(player, 'respond', null, 'count'), ps = player.mayHaveSha(player, 'respond', null, 'count');
|
||||
let ts = target.mayHaveSha(player, 'respond', null, 'count'), ps = player.mayHaveSha(player, 'respond', player.getCards('h', i => {
|
||||
return card === i || card.cards && card.cards.includes(i) || ui.selected.cards.includes(i);
|
||||
}), 'count');
|
||||
if (ts < 1) return -1.5;
|
||||
if (att > 0) return -2;
|
||||
if (ts - ps < 1) return -2 - ts;
|
||||
|
@ -2239,7 +2496,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
icesha_skill:{
|
||||
inherit:'hanbing_skill',
|
||||
trigger:{source:'damageBegin2'},
|
||||
trigger:{source:'damageBegin3'},
|
||||
equipSkill:false,
|
||||
ruleSkill:true,
|
||||
filter:function(event){
|
||||
|
@ -2653,14 +2910,19 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
audio:true,
|
||||
check:function(event,player){
|
||||
if(event&&(event.ai||event.ai1)){
|
||||
var ai=event.ai||event.ai1;
|
||||
if(!event) return true;
|
||||
if(event.ai){
|
||||
var ai=event.ai;
|
||||
var tmp=_status.event;
|
||||
_status.event=event;
|
||||
var result=ai({name:'shan'},_status.event.player,event);
|
||||
_status.event=tmp;
|
||||
return result>0;
|
||||
}
|
||||
let evt=event.getParent();
|
||||
if(player.hasSkillTag('noShan',null,evt)) return false;
|
||||
if(!evt||!evt.card||!evt.player||player.hasSkillTag('useShan',null,evt)) return true;
|
||||
if(evt.card&&evt.player&&player.isLinked()&&game.hasNature(evt.card)&&get.attitude(player,evt.player._trueMe||evt.player)>0) return false;
|
||||
return true;
|
||||
},
|
||||
content:function(){
|
||||
|
@ -2685,8 +2947,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(!arg||!arg.player) return true;
|
||||
if(arg.player.hasSkillTag('unequip',false,{
|
||||
target:player
|
||||
})||arg.player.hasSkillTag('unequip_ai',false,{
|
||||
target:player
|
||||
})) return false;
|
||||
return true;
|
||||
},
|
||||
|
@ -2727,6 +2987,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return true;
|
||||
},
|
||||
forceLoad:true,
|
||||
forceDie:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
delete event.wuxieresult;
|
||||
|
|
10
card/swd.js
10
card/swd.js
|
@ -1089,7 +1089,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
value:7,
|
||||
useful:1,
|
||||
tag:{
|
||||
draw:2
|
||||
gain:1
|
||||
},
|
||||
result:{
|
||||
target:function(player,target){
|
||||
|
@ -2418,7 +2418,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(card&&card.storage.shouna&&card.storage.shouna.length){
|
||||
return '共有'+get.cnNumber(card.storage.shouna.length)+'张牌';
|
||||
}
|
||||
return '共有〇张牌';
|
||||
return '共有零张牌';
|
||||
},
|
||||
mark:function(dialog,storage,player){
|
||||
var card=player.getEquip('lianyaohu');
|
||||
|
@ -2426,7 +2426,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
dialog.addAuto(card.storage.shouna);
|
||||
}
|
||||
else{
|
||||
return '共有〇张牌';
|
||||
return '共有零张牌';
|
||||
}
|
||||
},
|
||||
markcount:function(storage,player){
|
||||
|
@ -3099,7 +3099,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
event.hu=hu;
|
||||
}
|
||||
'step 1'
|
||||
if(!event.card.destroyed){
|
||||
if(!event.card._selfDestroyed){
|
||||
event.hu.storage.shouna.push(event.card);
|
||||
player.updateMarks();
|
||||
}
|
||||
|
@ -4588,7 +4588,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
"step 0"
|
||||
if(event.isMine()){
|
||||
event.longfan=ui.create.control('〇','〇','〇','〇',function(){
|
||||
event.longfan=ui.create.control('零','零','零','零',function(){
|
||||
event.longfan.status--;
|
||||
});
|
||||
event.longfan.status=4;
|
||||
|
|
|
@ -407,7 +407,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
value:[6,1],
|
||||
useful:[3,1],
|
||||
tag:{
|
||||
draw:1
|
||||
draw:3
|
||||
},
|
||||
result:{
|
||||
target:function(player,target){
|
||||
|
@ -480,39 +480,79 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
fullskin:true,
|
||||
type:'trick',
|
||||
enable:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return (target.isMinHp()&&target.isDamaged())||target.isMinHandcard();
|
||||
},
|
||||
content:function(){
|
||||
filterTarget:true,
|
||||
content(){
|
||||
'step 0'
|
||||
if(target.isMinHp()&&target.isDamaged()){
|
||||
target.recover();
|
||||
event.rec=true;
|
||||
}
|
||||
'step 1'
|
||||
if(target.isMinHandcard()){
|
||||
target.draw(event.rec?1:2);
|
||||
}
|
||||
if(target.isMinHandcard()) target.draw(event.rec?1:2);
|
||||
},
|
||||
ai:{
|
||||
order:2.5,
|
||||
order(){
|
||||
let player=_status.event.player,
|
||||
nan=player.hasCard(card=>{
|
||||
return get.name(card)==='nanman';
|
||||
},'hs'),
|
||||
wan=player.hasCard(card=>{
|
||||
return get.name(card)==='wanjian';
|
||||
},'hs'),
|
||||
aoe=0,
|
||||
max=0;
|
||||
game.countPlayer(current=>{
|
||||
if(get.attitude(player,current)<=0) return false;
|
||||
let hp=current.isMinHp(),
|
||||
hc=current.isMinHandcard();
|
||||
if((nan || wan)&&(hp || hc)) aoe=1;
|
||||
if(hp&&hc&&max!==1) max=current===player?1:-1;
|
||||
});
|
||||
if(aoe){
|
||||
if(nan) aoe=Math.max(aoe,get.order('nanman'));
|
||||
if(wan) aoe=Math.max(aoe,get.order('wanjian'));
|
||||
return aoe+0.2;
|
||||
}
|
||||
if(max) return 5.8;
|
||||
if(player.isDamaged()&&player.isMinHp()&&player.countCards('hs','tao')) return get.order('tao')+0.2;
|
||||
return 0.5;
|
||||
},
|
||||
value:7,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
var num=0;
|
||||
if(target.isMinHp()&&get.recoverEffect(target)>0){
|
||||
if(target.hp==1){
|
||||
num+=3;
|
||||
}
|
||||
else{
|
||||
num+=2;
|
||||
target(player,target){
|
||||
let num=0,
|
||||
current=player.next,
|
||||
mei=1,
|
||||
draw=target.hasSkillTag('nogain')?0.1:1;
|
||||
if(!ui.selected.cards) mei=0;
|
||||
let mine=player.countCards('h',card=>{
|
||||
if(mei>0&& ui.selected.cards.includes(card)) return false;
|
||||
if(!mei&&get.name(card)==='phd_wmzk'){
|
||||
mei=-1;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if(player.hasSkillTag('noh')&&player.countCards('h')) mine++;
|
||||
let min=mine;
|
||||
while(current!==player){
|
||||
if(current.countCards('h')<min) min=current.countCards('h');
|
||||
current=current.next;
|
||||
}
|
||||
if(target.isMinHandcard()){
|
||||
num+=2;
|
||||
if(target.isMinHp()&&target.isDamaged()&&get.recoverEffect(target)>0){
|
||||
if(target.hp===1) num+=3;
|
||||
else num+=2;
|
||||
}
|
||||
if(player===target){
|
||||
if(mine<=min) num+=(num?2:1)*draw;
|
||||
}
|
||||
else if(target.countCards('h')<=min) num+=(num?2:1)*draw;
|
||||
return num;
|
||||
}
|
||||
},
|
||||
tag:{
|
||||
draw:1.2,
|
||||
recover:0.5
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -20,21 +20,341 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
clan_wanghun:['male','jin',3,['clanfuxun','clanchenya','clanzhongliu'],['clan:太原王氏']],
|
||||
clan_zhonghui:['male','wei','3/4',['clanyuzhi','clanxieshu','clanbaozu'],['clan:颍川钟氏']],
|
||||
clan_zhongyu:['male','wei',3,['clanjiejian','clanhuanghan','clanbaozu'],['clan:颍川钟氏']],
|
||||
clan_wanglun:['male','wei',3,['clanqiuxin','clanjianyuan','clanzhongliu'],['clan:太原王氏']],
|
||||
clan_wanglun:['male','jin',3,['clanqiuxin','clanjianyuan','clanzhongliu'],['clan:太原王氏']],
|
||||
clan_xunyou:['male','wei',3,['clanbaichu','clandaojie'],['clan:颍川荀氏']],
|
||||
clan_wuqiao:['male','jin',4,['clanqiajue','clanmuyin'],['clan:陈留吴氏']],
|
||||
clan_wangguang:['male','wei',3,['clanlilun','clanjianji','clanzhongliu'],['clan:太原王氏']],
|
||||
clan_wangmingshan:['male','wei',3,['clantanque','clanshengmo','clanzhongliu'],['clan:太原王氏']],
|
||||
},
|
||||
characterSort:{
|
||||
clan:{
|
||||
clan_wu:['clan_wuxian','clan_wuban','clan_wukuang','clan_wuqiao'],
|
||||
clan_xun:['clan_xunshu','clan_xunchen','clan_xuncai','clan_xuncan','clan_xunyou'],
|
||||
clan_han:['clan_hanshao','clan_hanrong'],
|
||||
clan_wang:['clan_wangling','clan_wangyun','clan_wanghun','clan_wanglun'],
|
||||
clan_wang:['clan_wangling','clan_wangyun','clan_wanghun','clan_wanglun','clan_wangguang','clan_wangmingshan'],
|
||||
clan_zhong:['clan_zhongyan','clan_zhonghui','clan_zhongyu'],
|
||||
},
|
||||
},
|
||||
/** @type { importCharacterConfig['skill'] } */
|
||||
skill:{
|
||||
//族王明山
|
||||
clantanque:{
|
||||
audio:2,
|
||||
trigger:{player:'useCardAfter'},
|
||||
usable:1,
|
||||
filter(event,player){
|
||||
const evt=lib.skill.dcjianying.getLastUsed(player,event);
|
||||
if(!evt||!evt.card) return false;
|
||||
const curCard=event.card,prevCard=evt.card;
|
||||
const curNum=get.number(curCard),prevNum=get.number(prevCard);
|
||||
if(typeof curNum!='number'||typeof prevNum!='number') return false;
|
||||
const delNum=Math.abs(curNum-prevNum);
|
||||
if(delNum===0) return false;
|
||||
return game.hasPlayer(current=>{
|
||||
return current.getHp()===delNum;
|
||||
});
|
||||
},
|
||||
locked:false,
|
||||
async cost(event,trigger,player){
|
||||
const evt=lib.skill.dcjianying.getLastUsed(player,trigger);
|
||||
const curCard=trigger.card,prevCard=evt.card;
|
||||
const curNum=get.number(curCard),prevNum=get.number(prevCard);
|
||||
const delNum=Math.abs(curNum-prevNum);
|
||||
event.result=await player.chooseTarget(get.prompt('clantanque'),`对一名体力值为${delNum}的角色造成1点伤害`,(card,player,target)=>{
|
||||
return target.getHp()===get.event('delNum');
|
||||
}).set('delNum',delNum).set('ai',target=>{
|
||||
return get.damageEffect(target,get.player(),get.player());
|
||||
}).forResult();
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
const target=event.targets[0];
|
||||
await target.damage();
|
||||
await game.asyncDelayx();
|
||||
},
|
||||
mod:{
|
||||
aiOrder(player,card,num){
|
||||
if(typeof card!='object') return;
|
||||
const evt=lib.skill.dcjianying.getLastUsed(player);
|
||||
if(!evt||!evt.card) return;
|
||||
const curNum=get.number(card),prevNum=get.number(evt.card);
|
||||
if(typeof curNum!='number'||typeof prevNum!='number') return;
|
||||
const pairs=game.filterPlayer().map(current=>{
|
||||
return [current.getHp(),get.damageEffect(current,player,player)];
|
||||
}).filter(pair=>pair[1]>0);
|
||||
if(!pairs.length) return;
|
||||
const delNum=Math.abs(curNum-prevNum);
|
||||
for(const [hp,eff] of pairs){
|
||||
if(hp!=delNum) continue;
|
||||
return num+10+(pairs.filter(pair=>pair[0]===hp).sort((a,b)=>b[1]-a[1])[0][1])/20;
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
clanshengmo:{
|
||||
audio:2,
|
||||
enable:'chooseToUse',
|
||||
hiddenCard(player,name){
|
||||
if(get.type(name)!='basic') return false;
|
||||
if(!player.getStorage('clanshengmo').includes(name)&&(get.event('clanshengmo_cards')||[]).length>0) return true;
|
||||
},
|
||||
filter(event,player){
|
||||
if(event.responded) return false;
|
||||
const names=lib.inpile.filter(name=>get.type(name)=='basic'&&!player.getStorage('clanshengmo').includes(name)),cards=get.event('clanshengmo_cards')||[];
|
||||
return cards.length>0&&names.some(name=>{
|
||||
return event.filterCard({name,isCard:true},player,event);
|
||||
});
|
||||
},
|
||||
onChooseToUse(event){
|
||||
if(game.online) return;
|
||||
if(!event.clanshengmo_cards){
|
||||
let cards=[];
|
||||
game.checkGlobalHistory('cardMove',evt=>{
|
||||
if(evt.name!='cardsDiscard'&&(evt.name!='lose'||evt.position!=ui.discardPile)) return;
|
||||
cards.addArray(evt.cards.filter(card=>get.position(card,true)=='d'));
|
||||
});
|
||||
const numbers=cards.map(card=>get.number(card,false)).unique();
|
||||
const [min,max]=[Math.min(...numbers),Math.max(...numbers)];
|
||||
event.set('clanshengmo_cards',cards.filter(card=>{
|
||||
const num=get.number(card,false);
|
||||
return num>min&&num<max;
|
||||
}));
|
||||
}
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
const evt = event.getParent(2);
|
||||
const names = lib.inpile.filter(name => get.type(name) == 'basic' && !player.getStorage('clanshengmo').includes(name)), cards = evt.clanshengmo_cards;
|
||||
const links = await player.chooseButton(['剩墨:获得其中一张牌', cards], true).set('ai', button => {
|
||||
return get.value(button.link);
|
||||
}).forResultLinks();
|
||||
if (!links || !links.length) return;
|
||||
const list = [];
|
||||
for (const name of names) {
|
||||
const card = { name, isCard: true };
|
||||
if (evt.filterCard(card, player, evt)) {
|
||||
list.push(['基本', '', name]);
|
||||
}
|
||||
if (name == 'sha') {
|
||||
for (const nature of lib.inpile_nature) {
|
||||
card.nature = nature;
|
||||
if (evt.filterCard(card, player, evt)) {
|
||||
list.push(['基本', '', name, nature]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!list.length) return;
|
||||
const links2 = await player.chooseButton(['视为使用一张未以此法使用过的基本牌', [list, 'vcard']], true).set('ai', button => {
|
||||
return get.player().getUseValue(button.link) + 1;
|
||||
}).forResultLinks();
|
||||
const name = links2[0][2], nature = links2[0][3];
|
||||
game.broadcastAll((name, nature, toGain) => {
|
||||
lib.skill.clanshengmo_backup.viewAs = {
|
||||
name,
|
||||
nature,
|
||||
isCard: true,
|
||||
};
|
||||
lib.skill.clanshengmo_backup.prompt = `选择${get.translation(nature)}【${get.translation(name)}】的目标`;
|
||||
lib.skill.clanshengmo_backup.cardToGain = toGain;
|
||||
}, name, nature, links[0]);
|
||||
evt.set('_backupevent', 'clanshengmo_backup');
|
||||
evt.backup('clanshengmo_backup');
|
||||
evt.set('openskilldialog', `选择${get.translation(nature)}【${get.translation(name)}】的目标`);
|
||||
evt.set('norestore', true);
|
||||
evt.set('custom', {
|
||||
add: {},
|
||||
replace: { window() { } }
|
||||
});
|
||||
evt.goto(0);
|
||||
},
|
||||
marktext:'墨',
|
||||
intro:{
|
||||
content:'已以此法使用过$'
|
||||
},
|
||||
subSkill:{
|
||||
backup:{
|
||||
precontent(){
|
||||
delete event.result.skill;
|
||||
event.result.card.storage.clanshengmo = true;
|
||||
player.markAuto('clanshengmo',event.result.card.name);
|
||||
player.gain(lib.skill.clanshengmo_backup.cardToGain, 'gain2');
|
||||
},
|
||||
filterCard:()=>false,
|
||||
selectCard:-1,
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
order:3,
|
||||
result:{
|
||||
player(player){
|
||||
if(get.event().dying) return get.attitude(player, get.event().dying);
|
||||
if(get.event().type!='phase') return 1;
|
||||
const names=get.event(`clanshengmo_${player.playerid}_enabled_names`);
|
||||
return names.some(name=>{
|
||||
return player.getUseValue({name})>0;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//族贝斯塔[doge]
|
||||
clanlilun:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter(event,player){
|
||||
return player.hasCard(card=>get.info('clanlilun').filterCard(card,player),'h');
|
||||
},
|
||||
filterCard(card,player){
|
||||
if(player.getStorage('clanlilun').includes(card.name)) return false;
|
||||
if(ui.selected.cards.length&&ui.selected.cards[0].name!=card.name) return false;
|
||||
const cards=player.getCards('h',cardx=>player.canRecast(cardx));
|
||||
return cards.includes(card)&&cards.filter(i=>i.name==card.name).length>1;
|
||||
},
|
||||
selectCard:2,
|
||||
position:'h',
|
||||
check(card){
|
||||
const player=get.event('player');
|
||||
const value=function(card,player){
|
||||
const num=player.getUseValue(card);
|
||||
return num>0?(num+(1/(get.value(card)||0.5))+7):7-get.value(card);
|
||||
};
|
||||
if(ui.selected.cards.length&&value(card,player)<value(ui.selected.cards[0],player)) return 20-get.value(card);
|
||||
return value(card,player);
|
||||
},
|
||||
complexCard:true,
|
||||
discard:false,
|
||||
lose:false,
|
||||
delay:0,
|
||||
usable:1,
|
||||
async content(event,trigger,player){
|
||||
await player.recast(event.cards);
|
||||
if(!player.storage.clanlilun){
|
||||
player.when({global:'phaseAfter'}).then(()=>{
|
||||
player.unmarkSkill('clanlilun');
|
||||
delete player.storage.clanlilun;
|
||||
});
|
||||
}
|
||||
player.markAuto('clanlilun',event.cards.slice().map(card=>card.name));
|
||||
const cards=event.cards.filterInD('d');
|
||||
if(cards.some(card=>player.hasUseTarget(card))){
|
||||
const {result:{bool,links}}=await player.chooseButton(['离论:是否使用其中的一张牌?',cards]).set('filterButton',button=>{
|
||||
return get.event('player').hasUseTarget(button.link);
|
||||
}).set('ai',button=>{
|
||||
return get.event('player').getUseValue(button.link);
|
||||
});
|
||||
if(bool){
|
||||
const card=links[0];
|
||||
player.$gain2(card,false);
|
||||
await game.asyncDelayx();
|
||||
await player.chooseUseTarget(true,card,false);
|
||||
}
|
||||
}
|
||||
},
|
||||
onremove:true,
|
||||
intro:{content:'本回合已重铸过$'},
|
||||
ai:{
|
||||
order(item,player){
|
||||
let cards=player.getCards('h',card=>get.info('clanlilun').filterCard(card,player)&&player.getUseValue(card)>0);
|
||||
cards=cards.filter(card=>cards.filter(i=>i.name==card.name).length>1);
|
||||
if(!cards.length) return 1;
|
||||
cards.sort((a,b)=>get.order(b)-get.order(a));
|
||||
return get.order(cards[0])-0.001;
|
||||
},
|
||||
result:{player:1},
|
||||
},
|
||||
},
|
||||
clanjianji:{
|
||||
unique:true,
|
||||
limited:true,
|
||||
audio:2,
|
||||
trigger:{global:'phaseJieshuBegin'},
|
||||
filter(event,player){
|
||||
if(!event.player.isIn()) return false;
|
||||
const targets=game.filterPlayer(target=>{
|
||||
return event.player.getPrevious()==target||event.player.getNext()==target;
|
||||
});
|
||||
if(!targets.length) return false;
|
||||
const card=new lib.element.VCard({name:'sha'});
|
||||
return !targets.some(target=>{
|
||||
return target.getHistory('useCard').length;
|
||||
})||(player.hasUseTarget(card)&&!targets.some(target=>{
|
||||
return game.hasPlayer2(current=>{
|
||||
return current.getHistory('useCard',evt=>{
|
||||
return evt.targets&&evt.targets.includes(target);
|
||||
}).length;
|
||||
});
|
||||
}));
|
||||
},
|
||||
skillAnimation:true,
|
||||
animationColor:'watar',
|
||||
prompt2(event,player){
|
||||
let str='';
|
||||
const card=new lib.element.VCard({name:'sha'});
|
||||
const targets=game.filterPlayer(target=>{
|
||||
return event.player.getPrevious()==target||event.player.getNext()==target;
|
||||
}),bool=(!targets.some(target=>{
|
||||
return target.getHistory('useCard').length;
|
||||
})),goon=(player.hasUseTarget(card)&&!targets.some(target=>{
|
||||
return game.hasPlayer2(current=>{
|
||||
return current.getHistory('useCard',evt=>{
|
||||
return evt.targets&&evt.targets.includes(target);
|
||||
}).length;
|
||||
});
|
||||
}));
|
||||
if(bool){
|
||||
if(goon) str+='你可以';
|
||||
str+='与'+get.translation(get.translation(event.player))+'各摸一张牌';
|
||||
}
|
||||
if(goon){
|
||||
if(bool) str+=',然后你可以';
|
||||
str+='视为使用一张【杀】';
|
||||
}
|
||||
return str;
|
||||
},
|
||||
check(event,player){
|
||||
const card=new lib.element.VCard({name:'sha'});
|
||||
const targets=game.filterPlayer(target=>{
|
||||
return event.player.getPrevious()==target||event.player.getNext()==target;
|
||||
}),bool=(!targets.some(target=>{
|
||||
return target.getHistory('useCard').length;
|
||||
})),goon=(player.hasUseTarget(card)&&!targets.some(target=>{
|
||||
return game.hasPlayer2(current=>{
|
||||
return current.getHistory('useCard',evt=>{
|
||||
return evt.targets&&evt.targets.includes(target);
|
||||
}).length;
|
||||
});
|
||||
}));
|
||||
return (bool&&(get.attitude(player,event.player)>0||event.player.countCards('h')>player.countCards('h')))||(goon&&player.hasValueTarget(card));
|
||||
},
|
||||
logTarget:'player',
|
||||
async content(event,trigger,player){
|
||||
player.awakenSkill('clanjianji');
|
||||
const card=new lib.element.VCard({name:'sha'});
|
||||
const targets=game.filterPlayer(target=>{
|
||||
return trigger.player.getPrevious()==target||trigger.player.getNext()==target;
|
||||
}),boolx=(!targets.some(target=>{
|
||||
return target.getHistory('useCard').length;
|
||||
})),goon=(player.hasUseTarget(card)&&!targets.some(target=>{
|
||||
return game.hasPlayer2(current=>{
|
||||
return current.getHistory('useCard',evt=>{
|
||||
return evt.targets&&evt.targets.includes(target);
|
||||
}).length;
|
||||
});
|
||||
}));
|
||||
if(boolx){
|
||||
let draw=false;
|
||||
if(goon){
|
||||
const {result:{bool}}=await player.chooseBool('是否与'+get.translation(trigger.player)+'各摸一张牌?').set('choice',get.attitude(player,trigger.player)>0||trigger.player.countCards('h')>player.countCards('h'));
|
||||
if(bool) draw=true;
|
||||
}
|
||||
else draw=true;
|
||||
if(draw){
|
||||
await player.draw('nodelay');
|
||||
await trigger.player.draw();
|
||||
}
|
||||
}
|
||||
if(goon) await player.chooseUseTarget(card,false,!boolx);
|
||||
},
|
||||
},
|
||||
//族吴乔
|
||||
clanqiajue:{
|
||||
audio:2,
|
||||
|
@ -415,21 +735,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content(){
|
||||
'step 0'
|
||||
player.unmarkSkill('clanyuzhi');
|
||||
var num1=0,num2=0,num3=0,bool=true;
|
||||
var history=player.actionHistory;
|
||||
for(var i=history.length-2;i>=0;i--){
|
||||
for(var evt of history[i].gain){
|
||||
if(evt.getParent().name=='draw'&&evt.getParent(2).name=='clanyuzhi'){
|
||||
if(bool) num1+=evt.cards.length;
|
||||
else num2+=evt.cards.length;
|
||||
}
|
||||
}
|
||||
if(bool) num3+=history[i].useCard.length;
|
||||
if(history[i].isRound){
|
||||
if(bool) bool=false;
|
||||
else break;
|
||||
}
|
||||
}
|
||||
var num1=player.getRoundHistory('gain',evt=>{
|
||||
return evt.getParent().name=='draw'&&evt.getParent(2).name=='clanyuzhi';
|
||||
},1).reduce((sum,evt)=>sum+evt.cards.length,0);
|
||||
var num2=player.getRoundHistory('gain',evt=>{
|
||||
return evt.getParent().name=='draw'&&evt.getParent(2).name=='clanyuzhi';
|
||||
},2).reduce((sum,evt)=>sum+evt.cards.length,0);
|
||||
var num3=player.getRoundHistory('useCard',evt=>{
|
||||
return evt.cards&&evt.cards.length;
|
||||
},1).reduce((sum,evt)=>sum+evt.cards.length,0);
|
||||
event.num1=num1;
|
||||
if(num1>0&&(num2>0&&num1>num2)||num1>num3){
|
||||
player.logSkill('clanyuzhi');
|
||||
|
@ -447,10 +761,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 2'
|
||||
if(!player.countCards('h')) event.finish();
|
||||
'step 3'
|
||||
player.chooseCard('迂志:请展示一张手牌','摸此牌牌名字数的牌。下一轮开始时,若本轮你使用的牌数或上一轮你以此法摸的牌数小于此牌牌名字数,则你失去1点体力。',true,function(card,player){
|
||||
player.chooseCard('迂志:请展示一张手牌','摸此牌牌名字数的牌。下一轮开始时,若本轮你使用的牌数或上一轮你以此法摸的牌数小于此牌牌名字数,则你失去1点体力。',function(card,player){
|
||||
var num=get.cardNameLength(card);
|
||||
return typeof num=='number'&&num>0;
|
||||
}).set('ai',function(card){
|
||||
},true).set('logSkill','clanyuzhi').set('ai',function(card){
|
||||
if(_status.event.dying&&_status.event.num>0&&get.cardNameLength(card)>_status.event.num) return 1/get.cardNameLength(card);//怂
|
||||
return get.cardNameLength(card);//勇
|
||||
}).set('dying',player.hp+player.countCards('hs',{name:['tao','jiu']})<1).set('num',event.num1);
|
||||
|
@ -474,7 +788,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
trigger:{player:'damageEnd',source:'damageSource'},
|
||||
filter(event,player){
|
||||
if(!event.card) return false;
|
||||
if(!event.card/*||player.isLinked()*/) return false;
|
||||
if(game.getGlobalHistory('everything',evt=>{
|
||||
if(evt.name!='damage'||!evt.card) return false;
|
||||
return evt.player==player||(evt.source&&evt.source==player);
|
||||
}).indexOf(event)!=0) return false;
|
||||
var num=get.cardNameLength(event.card);
|
||||
return typeof num=='number'&&num>0&&player.countCards('he')>0;
|
||||
},
|
||||
|
@ -483,7 +801,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
var num=get.cardNameLength(trigger.card),str='';
|
||||
if(player.getDamagedHp()>0) str+=('并摸'+get.cnNumber(player.getDamagedHp())+'张牌');
|
||||
player.chooseToDiscard(get.prompt('clanxieshu'),'弃置'+get.cnNumber(num)+'张牌'+str,'he',num).set('ai',function(card){
|
||||
player.chooseToDiscard(get.prompt('clanxieshu'),/*'横置武将牌,'+*/'弃置'+get.cnNumber(num)+'张牌'+str,'he',num).set('ai',function(card){
|
||||
var player=_status.event.player;
|
||||
var num=_status.event.num;
|
||||
var num2=player.getDamagedHp();
|
||||
|
@ -492,7 +810,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return 0;
|
||||
}).set('num',num).logSkill='clanxieshu';
|
||||
'step 1'
|
||||
if(result.bool&&player.getDamagedHp()>0) player.draw(player.getDamagedHp());
|
||||
if(result.bool){
|
||||
//player.link(true);
|
||||
if(player.getDamagedHp()>0) player.draw(player.getDamagedHp());
|
||||
}
|
||||
},
|
||||
ai:{threaten:3},
|
||||
},
|
||||
|
@ -1075,8 +1396,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
},
|
||||
prompt(result){
|
||||
if(result.index>0) return '点击“确定”以观看牌堆顶牌';
|
||||
prompt(result,player){
|
||||
if(!player.storage.clanguangu) return '点击“确定”以观看牌堆顶牌';
|
||||
return '观骨:选择观看牌的目标';
|
||||
},
|
||||
},
|
||||
|
@ -1231,7 +1552,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
clanzhongliu:{
|
||||
audio:2,
|
||||
audioname:['clan_wangling','clan_wangyun','clan_wanghun','clan_wanglun'],
|
||||
audioname:['clan_wangling','clan_wangyun','clan_wanghun','clan_wanglun','clan_wangguang','clan_wangmingshan'],
|
||||
trigger:{player:'useCard'},
|
||||
forced:true,
|
||||
clanSkill:true,
|
||||
|
@ -1824,16 +2145,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
filter(event,player){
|
||||
if(!game.hasPlayer(current=>current!=player)) return false;
|
||||
var card=event.card,type=get.type2(card);
|
||||
for(var i=player.actionHistory.length-1; i>=0; i--){
|
||||
var history=player.actionHistory[i].useCard;
|
||||
for(var evt of history){
|
||||
if(evt==event) continue;
|
||||
if(get.type2(evt.card)==type) return false;
|
||||
}
|
||||
if(player.actionHistory[i].isRound) break;
|
||||
}
|
||||
return true;
|
||||
const type=get.type2(event.card);
|
||||
return player.getRoundHistory('useCard',evt=>get.type2(evt.card)==type).indexOf(event)==0;
|
||||
},
|
||||
getNum(player){
|
||||
return (player.countCards('ej')>0)+(player.isDamaged())+(Math.max(0,player.hp)<player.countCards('h'));
|
||||
|
@ -2315,31 +2628,76 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
clandianzhan:{
|
||||
audio:2,
|
||||
intro:{
|
||||
content:'已使用过的花色:$',
|
||||
onunmark:true,
|
||||
},
|
||||
trigger:{player:'useCardAfter'},
|
||||
forced:true,
|
||||
filter(event,player){
|
||||
if(!lib.suit.includes(get.suit(event.card))) return false;
|
||||
var card=event.card,suit=get.suit(card);
|
||||
for(var i=player.actionHistory.length-1; i>=0; i--){
|
||||
var history=player.actionHistory[i].useCard;
|
||||
for(var evt of history){
|
||||
if(evt==event) continue;
|
||||
if(get.suit(evt.card)==suit) return false;
|
||||
}
|
||||
if(player.actionHistory[i].isRound) break;
|
||||
}
|
||||
return event.targets&&event.targets.length==1&&!event.targets[0].isLinked()||
|
||||
player.hasCard(card=>get.suit(card)==get.suit(event.card)&&player.canRecast(card),'h');
|
||||
const suit=get.suit(event.card);
|
||||
if(player.getRoundHistory('useCard',evt=>get.suit(evt.card)==suit).indexOf(event)!=0) return false;
|
||||
return event.targets&&event.targets.length==1&&!event.targets[0].isLinked()||player.hasCard(card=>get.suit(card)==get.suit(event.card)&&player.canRecast(card),'h');
|
||||
},
|
||||
content(){
|
||||
'step 0'
|
||||
if(trigger.targets&&trigger.targets.length==1){
|
||||
if(trigger.targets&&trigger.targets.length==1&&!trigger.targets[0].isLinked()){
|
||||
trigger.targets[0].link(true);
|
||||
event.link=true;
|
||||
}
|
||||
var cards=player.getCards('h',card=>get.suit(card)==get.suit(trigger.card)&&player.canRecast(card));
|
||||
if(cards.length>0) player.recast(cards);
|
||||
if(cards.length>0){
|
||||
player.recast(cards);
|
||||
event.recast=true;
|
||||
}
|
||||
'step 1'
|
||||
player.draw();
|
||||
if(event.link&&event.recast) player.draw();
|
||||
},
|
||||
group:'clandianzhan_count',
|
||||
subSkill:{
|
||||
count:{
|
||||
charlotte:true,
|
||||
trigger:{player:'useCardAfter'},
|
||||
filter(event,player){
|
||||
let suit=get.suit(event.card);
|
||||
return lib.suits.includes(suit)&&!player.getStorage('clandianzhan').includes(suit);
|
||||
},
|
||||
forced:true,
|
||||
silent:true,
|
||||
content(){
|
||||
let suits=player.getRoundHistory('useCard',evt=>{
|
||||
return lib.suits.includes(get.suit(evt.card));
|
||||
}).reduce((list,evt)=>{
|
||||
return list.add(get.suit(evt.card));
|
||||
},[]).sort((a,b)=>lib.suits.indexOf(a)-lib.suits.indexOf(b));
|
||||
if(!player.storage.clandianzhan){
|
||||
player.when({global:'roundStart'}).then(()=>{
|
||||
delete player.storage.clandianzhan;
|
||||
player.unmarkSkill('clandianzhan');
|
||||
});
|
||||
}
|
||||
player.storage.clandianzhan=suits;
|
||||
player.markSkill('clandianzhan');
|
||||
},
|
||||
},
|
||||
},
|
||||
init(player){
|
||||
let suits=player.getRoundHistory('useCard',evt=>{
|
||||
return lib.suits.includes(get.suit(evt.card));
|
||||
}).reduce((list,evt)=>{
|
||||
return list.add(get.suit(evt.card));
|
||||
},[]).sort((a,b)=>lib.suits.indexOf(a)-lib.suits.indexOf(b));
|
||||
if(suits.length){
|
||||
if(!player.storage.clandianzhan){
|
||||
player.when({global:'roundStart'}).then(()=>{
|
||||
delete player.storage.clandianzhan;
|
||||
player.unmarkSkill('clandianzhan');
|
||||
});
|
||||
}
|
||||
player.storage.clandianzhan=suits;
|
||||
player.markSkill('clandianzhan');
|
||||
}
|
||||
}
|
||||
},
|
||||
clanhuanyin:{
|
||||
|
@ -2622,6 +2980,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
zhongyu:'钟毓(?-263年),字稚叔,颍川长社(今河南长葛市)人。三国时期魏国大臣,太傅钟繇之子、司徒钟会之兄。出身颍川钟氏,机灵敏捷,有其父之遗风。十四岁时,起家散骑侍郎。太和初年,迁黄门侍郎,袭封定陵县侯。正始年间,拜散骑常侍,迁魏郡太守,入为侍中、御史中丞、廷尉 [5] 。随平诸葛诞的淮南叛乱,拜青州刺史、后将军,都督徐州、荆州诸军事。景元四年(263年),去世,追赠车骑将军,谥号为惠,著有文集五卷(见《隋书·经籍志》及《两唐书·经籍志》),传于世。',
|
||||
wanglun:'王沦(233年-257年)字太冲,出身太原晋阳王姓世族(今山西省太原市),王昶三子,王浑、王深之弟,王湛之兄。醇粹简远,崇尚老庄之学,心思平淡。二十多时被举荐为孝廉,没有前往,后任大将军参军。257年,诸葛诞不满司马氏篡权而在寿春起义,王沦跟随司马昭征讨,遭遇疾疫去世,时年二十五,时人惜之,司马昭为他流泪。其兄著诔文《表德论》,表述其德行,说“因为畏惧帝王的典章制度,不能写墓志铭,于是撰写过往的事迹,刻在墓的背面。”',
|
||||
wuqiao:'吴乔,西晋人物,蜀车骑将军吴懿之孙。李雄建立成汉政权,他沦落益州,长达三十年,始终不向李雄屈服。',
|
||||
clan_wangguang:'王广,三国时期曹魏太原祁县人,哲学家。东汉司徒王允从孙,魏太尉王凌之子。有志尚学,官至尚书。魏时随父亲在朝作官,屯骑校尉,机智有谋。当得知司马懿篡夺曹魏政权时,王凌与外甥令狐愚合谋立楚王为魏主,王广劝其父不可,王凌没有接受儿子的谏言,结果计谋泄而被害。',
|
||||
wangmingshan:'王明山,王凌的小儿子,太原祁(今山西省祁县)人,三国魏书法家,最知名善画,多技艺,人得其书,皆以为法。太尉王凌参与谋划废立,事情泄露,被太傅司马懿领兵平定。',
|
||||
},
|
||||
dynamicTranslate:{
|
||||
clanlianzhu(player){
|
||||
|
@ -2679,7 +3039,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
clanlieshi:'烈誓',
|
||||
clanlieshi_info:'出牌阶段,你可以选择一项:1.废除判定区并受到你造成的1点火焰伤害;2.弃置所有【闪】;3.弃置所有【杀】。然后令一名其他角色从你未选择的选项中选择一项。',
|
||||
clandianzhan:'点盏',
|
||||
clandianzhan_info:'锁定技。当你每轮第一次使用一种花色的牌后:若此牌的目标数为1,你横置此牌目标;若你有此花色的手牌,你重铸这些牌。然后你摸一张牌。',
|
||||
clandianzhan_info:'锁定技。当你每轮第一次使用一种花色的牌后:若此牌的目标数为1且目标未横置,你横置此牌目标;若你有此花色的手牌,你重铸这些牌。均执行后你摸一张牌。',
|
||||
clanhuanyin:'还阴',
|
||||
clanhuanyin_info:'锁定技。当你进入濒死状态时,将手牌补至四张。',
|
||||
clan_xunchen:'族荀谌',
|
||||
|
@ -2735,7 +3095,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
clanyuzhi:'迂志',
|
||||
clanyuzhi_info:'锁定技。新的一轮开始时,你依次执行以下项:①若你上一轮使用的牌数或你上上轮因〖迂志〗摸的牌数小于你上轮因〖迂志〗摸的牌数,你失去1点体力或失去〖保族〗。②你展示一张手牌,然后摸X张牌(X为此牌牌名字数)。',
|
||||
clanxieshu:'挟术',
|
||||
clanxieshu_info:'当你使用牌造成伤害后,或受到来自牌造成的伤害后,你可以弃置Y张牌并摸你已损失体力值张牌(Y为此牌牌名字数)。',
|
||||
clanxieshu_info:'当你每回合首次因牌造成或受到伤害后,你可以弃置Y张牌并摸你已损失体力值张牌(Y为此牌牌名字数)。',
|
||||
clan_zhongyu:'族钟毓',
|
||||
clanjiejian:'捷谏',
|
||||
clanjiejian_info:'当你于一回合使用第X张牌指定第一个目标后,若此牌不为装备牌,则你可以令一名目标角色摸X张牌。(X为此牌牌名字数)',
|
||||
|
@ -2752,6 +3112,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
clan_wuqiao:'族吴乔',
|
||||
clanqiajue:'跒倔',
|
||||
clanqiajue_info:'摸牌阶段开始时,你可以弃置一张黑色牌。若如此做,此阶段结束时,你展示手牌,若这些牌的点数和大于30,你的手牌上限-2,否则你执行一个额外的摸牌阶段。',
|
||||
clan_wangguang:'族王广',
|
||||
clan_wangguang_prefix:'族',
|
||||
clanlilun:'离论',
|
||||
clanlilun_info:'出牌阶段限一次,你可以重铸两张手牌(不能是你本回合以此法重铸过的牌名的牌),然后使用其中的一张牌。',
|
||||
clanjianji:'见机',
|
||||
clanjianji_info:'限定技,一名角色的结束阶段,若其上下家均未于本回合:使用过牌,则你可以与其各摸一张牌;成为过牌的目标,则你可以视为使用一张【杀】。',
|
||||
clan_wangmingshan:'族王明山',
|
||||
clan_wangmingshan_prefix:'族',
|
||||
clantanque:'弹雀',
|
||||
clantanque_info:'每回合限一次。当你使用牌结算结束后,你可以对一名体力值为X且不为0的角色造成1点伤害(X为此牌点数与你上一张使用的牌的点数之差)。',
|
||||
clanshengmo:'剩墨',
|
||||
clanshengmo_info:'当你需要使用一张未以此法使用过的基本牌时,你可以获得一张于本回合进入弃牌堆且点数不为这些牌中最大且不为这些牌中最小的牌,视为你使用需要使用的牌。',
|
||||
|
||||
clan_wu:'陈留·吴氏',
|
||||
clan_xun:'颍川·荀氏',
|
||||
|
|
297
character/ddd.js
297
character/ddd.js
|
@ -1630,185 +1630,140 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
dddzhengjun:{
|
||||
trigger:{
|
||||
global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'],
|
||||
},
|
||||
trigger:{global:['damageEnd','loseHpEnd','recoverEnd','loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter']},
|
||||
filter(event,player){
|
||||
if(!player.isPhaseUsing()) return false;
|
||||
var boolh=!player.hasSkill('dddzhengjun_handcard',null,false,false),boole=(!player.hasSkill('dddzhengjun_equip')&&player.canMoveCard(null,true));
|
||||
var hs=player.countCards('h'),es=player.countCards('e');
|
||||
return game.hasPlayer(function(current){
|
||||
// if(player==current) return false;
|
||||
if(boolh&¤t.countCards('h')==hs){
|
||||
var num=event.getl(current).hs.length;
|
||||
if(event.getg) num-=event.getg(current).length;
|
||||
if(num!=0) return game.hasPlayer(current=>{
|
||||
if(player==current) return false;
|
||||
return current.countCards('h')==player.countCards('h');
|
||||
});
|
||||
}
|
||||
if(boole&¤t.countCards('e')==es){
|
||||
var num=event.getl(current).es.length;
|
||||
if(event.name=='equip'&¤t==event.player) num--;
|
||||
if(num!=0) return game.hasPlayer(current=>{
|
||||
if(player==current) return false;
|
||||
return current.countCards('e')==player.countCards('e');
|
||||
});
|
||||
}
|
||||
return false;
|
||||
if(event.name=='damage'||event.name=='loseHp'||event.name=='recover'){
|
||||
if(player.hasSkill('dddzhengjun_hp')) return false;
|
||||
return event.player.getHp()==player.getHp();
|
||||
}
|
||||
const info=get.info('dddzhengjun');
|
||||
const hs_check=info.hs_check,es_check=info.es_check;
|
||||
return game.hasPlayer(target=>{
|
||||
if(event.getg&&event.getg(target)&&event.getg(target).length&&hs_check(player,target)) return true;
|
||||
const evt=event.getl(target);
|
||||
if(evt&&evt.hs&&evt.hs.length&&hs_check(player,target)) return true;
|
||||
if(event.name=='equip'&&event.player==target&&(!evt||evt.cards.length!=1)&&es_check(player,target)) return true;
|
||||
return evt&&evt.es&&evt.es.length&&es_check(player,target);
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
*content(event,map){
|
||||
var player=map.player,trigger=map.trigger;
|
||||
var boolh=!player.hasSkill('dddzhengjun_handcard',null,false,false),hs=player.countCards('h');
|
||||
if(boolh&&game.hasPlayer(function(current){
|
||||
// if(player==current) return false;
|
||||
if(boolh&¤t.countCards('h')==hs){
|
||||
var num=trigger.getl(current).hs.length;
|
||||
if(trigger.getg) num-=trigger.getg(current).length;
|
||||
if(num!=0) return game.hasPlayer(current=>{
|
||||
if(player==current) return false;
|
||||
return current.countCards('h')==player.countCards('h');
|
||||
});
|
||||
}
|
||||
return false;
|
||||
})){
|
||||
var result=yield player.chooseTarget(get.prompt('dddzhengjun'),'令一名手牌数与你相等的其他角色摸或弃置一张牌',(card,player,target)=>{
|
||||
return player.countCards('h')==target.countCards('h')&&player!=target;
|
||||
}).set('ai',target=>{
|
||||
var player=get.player();
|
||||
return Math.max(get.effect(target,{name:'draw'},player,player),get.effect(target,{name:'guohe'},player,player)/2);
|
||||
});
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
var choices=['摸牌'];
|
||||
if(target.countCards('he')) choices.push('弃牌');
|
||||
result=yield player.chooseControl(choices).set('prompt',`整军:请选择一项`).set('prompt2',`令${get.translation(target)}摸一张牌或弃置一张牌`).set('ai',()=>{
|
||||
return get.event('choice');
|
||||
}).set('choice',get.attitude(player,target)>0||!choices.includes('弃牌')?0:1);
|
||||
player.logSkill('dddzhengjun',target);
|
||||
player.addTempSkill('dddzhengjun_handcard','phaseUseAfter');
|
||||
if(result.control=='摸牌') target.draw();
|
||||
else target.chooseToDiscard('he',true);
|
||||
}
|
||||
}
|
||||
var boole=(!player.hasSkill('dddzhengjun_equip')&&player.canMoveCard(null,true)),es=player.countCards('h');
|
||||
if(boolh&&game.hasPlayer(function(current){
|
||||
// if(player==current) return false;
|
||||
if(boole&¤t.countCards('e')==es){
|
||||
var num=trigger.getl(current).es.length;
|
||||
if(trigger.name=='equip'&&trigger.player==current) num--;
|
||||
if(num!=0) return game.hasPlayer(current=>{
|
||||
if(player==current) return false;
|
||||
return current.countCards('e')==player.countCards('e');
|
||||
});
|
||||
}
|
||||
return false;
|
||||
})){
|
||||
var result=yield player.chooseBool(get.prompt('dddzhengjun'),'移动一名装备区牌数与你相等的其他角色装备区里的一张牌').set('ai',function(){
|
||||
var targets=game.filterPlayer(target=>player.countCards('e')==target.countCards('e')&&player!=target);
|
||||
return get.player().canMoveCard(true,true,targets);
|
||||
});
|
||||
if(result.bool){
|
||||
player.logSkill('dddzhengjun');
|
||||
player.addTempSkill('dddzhengjun_equip','phaseUseAfter');
|
||||
player.moveCard(true,true,game.filterPlayer(target=>player.countCards('e')==target.countCards('e')&&player!=target));
|
||||
}
|
||||
}
|
||||
hs_check(player,target){
|
||||
return !player.hasSkill('dddzhengjun_hs')&&target.countCards('h')==player.countCards('h');
|
||||
},
|
||||
content_old(){
|
||||
'step 0'
|
||||
var boolh=!player.hasSkill('dddzhengjun_handcard',null,false,false),hs=player.countCards('h');
|
||||
if(boolh&&game.hasPlayer(function(current){
|
||||
if(player==current) return false;
|
||||
if(boolh&¤t.countCards('h')==hs){
|
||||
var num=trigger.getl(current).hs.length;
|
||||
if(trigger.getg) num-=trigger.getg(current).length;
|
||||
if(num!=0) return true;
|
||||
}
|
||||
return false;
|
||||
})){
|
||||
player.chooseTarget('整军:是否令一名角色摸一张牌?').set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
return get.effect(target,{name:'draw'},player,player);
|
||||
});
|
||||
}
|
||||
else event.goto(2);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.logSkill('dddzhengjun',target);
|
||||
player.addTempSkill('dddzhengjun_handcard','phaseUseAfter');
|
||||
target.draw();
|
||||
}
|
||||
'step 2'
|
||||
var boole=(!player.hasSkill('dddzhengjun_equip')&&player.canMoveCard(null,true)),es=player.countCards('h');
|
||||
if(boolh&&game.hasPlayer(function(current){
|
||||
if(player==current) return false;
|
||||
if(boole&¤t.countCards('e')==es){
|
||||
var num=trigger.getl(current).es.length;
|
||||
if(trigger.name=='equip'&&trigger.player==current) num--;
|
||||
if(num!=0) return true;
|
||||
}
|
||||
return false;
|
||||
})){
|
||||
player.chooseBool('整军:是否移动场上的一张装备牌?').set('ai',function(){
|
||||
return _status.event.player.canMoveCard(true,true);
|
||||
})
|
||||
}
|
||||
else event.finish();
|
||||
'step 3'
|
||||
if(result.bool){
|
||||
player.logSkill('dddzhengjun');
|
||||
player.addTempSkill('dddzhengjun_equip','phaseUseAfter');
|
||||
player.moveCard(true).set('nojudge',true);
|
||||
}
|
||||
es_check(player,target){
|
||||
return !player.hasSkill('dddzhengjun_es')&&target.countCards('e')==player.countCards('e');
|
||||
},
|
||||
group:'dddzhengjun_hp',
|
||||
subSkill:{
|
||||
equip:{charlotte:true},
|
||||
handcard:{charlotte:true},
|
||||
hp:{
|
||||
trigger:{global:['damageEnd','loseHpEnd','recoverEnd']},
|
||||
direct:true,
|
||||
filter(event,player){
|
||||
if(player.hp!=event.player.hp) return false;
|
||||
if(event.hujia&&event.hujia==event.num) return false;
|
||||
if(!game.hasPlayer(current=>current.getHp()==player.getHp()&¤t!=player)) return false;
|
||||
var evt=event.getParent('phaseUse');
|
||||
if(!evt||evt.player!=player) return false;
|
||||
return !player.hasHistory('useSkill',function(evt){
|
||||
if(evt.skill=='dddzhengjun_hp'){
|
||||
if(evt.event.getParent('phaseUse')==event) return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
},
|
||||
content(){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt('dddzhengjun'),'令一名体力值与你相等的其他角色回复或失去1点体力',function(card,player,target){
|
||||
return target.getHp()==player.getHp()&&player!=target;
|
||||
}).set('ai',target=>{
|
||||
var player=get.player();
|
||||
return Math.max(get.recoverEffect(target,player,player),get.effect(target,{name:'losehp'},player,player));
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
event.target=target;
|
||||
var choices=['失去体力'];
|
||||
if(target.isDamaged()) choices.push('回复体力');
|
||||
player.chooseControl(choices).set('prompt',`整军:请选择一项`).set('prompt2',`令${get.translation(target)}失去1点体力或回复1点体力`).set('ai',()=>{
|
||||
return get.event('choice');
|
||||
}).set('choice',get.recoverEffect(target,player,player)>0&&target.isDamaged()?1:0);
|
||||
async cost(event,trigger,player){
|
||||
if(trigger.name=='damage'||trigger.name=='loseHp'||trigger.name=='recover'){
|
||||
let list=['失去体力','cancel2'];
|
||||
if(trigger.player.isDamaged()) list.unshift('回复体力');
|
||||
const {result:{control}}=await player.chooseControl(list)
|
||||
.set('prompt',get.prompt('dddzhengjun',trigger.player))
|
||||
.set('prompt2','令'+get.translation(event.player)+'执行其中一项')
|
||||
.set('ai',()=>{
|
||||
const player=get.event('player'),target=get.event().getTrigger().player;
|
||||
if(get.event('controls').includes('回复体力')&&get.recoverEffect(target,player,player)>0) return '回复体力';
|
||||
return get.effect(target,{name:'losehp'},player,player)>0?'失去体力':'cancel2';
|
||||
});
|
||||
event.result={
|
||||
bool:control!='cancel2',
|
||||
targets:[trigger.player],
|
||||
cost_data:control,
|
||||
};
|
||||
}
|
||||
else{
|
||||
let map={};
|
||||
const hs_targets=game.filterPlayer(target=>{
|
||||
if(!get.info('dddzhengjun').hs_check(player,target)) return false;
|
||||
if(trigger.getg&&trigger.getg(target)&&trigger.getg(target).length) return true;
|
||||
const evt=trigger.getl(target);
|
||||
return evt&&evt.hs&&evt.hs.length;
|
||||
});
|
||||
const es_targets=game.filterPlayer(target=>{
|
||||
if(!get.info('dddzhengjun').es_check(player,target)) return false;
|
||||
const evt=trigger.getl(target);
|
||||
if(trigger.name=='equip'&&trigger.player==target&&(!evt||evt.cards.length!=1)) return true;
|
||||
return evt&&evt.es&&evt.es.length;
|
||||
});
|
||||
if(hs_targets.length){
|
||||
let target;
|
||||
if(hs_targets.length==1) target=hs_targets[0];
|
||||
else{
|
||||
let targets=await player.chooseTarget(get.prompt('dddzhengjun'),'令其中一名角色摸一张牌或弃置一张牌',(card,player,target)=>{
|
||||
return get.event('targets').includes(target);
|
||||
}).set('ai',target=>{
|
||||
const player=get.event('player');
|
||||
return Math.max(get.effect(target,{name:'guohe_copy2'},target,player),get.effect(target,{name:'draw'},player,player));
|
||||
}).set('targets',hs_targets).forResultTargets();
|
||||
if(targets&&targets.length) target=targets[0];
|
||||
}
|
||||
if(target){
|
||||
let list=['摸牌'];
|
||||
if(target.countCards('h')) list.push('弃牌');
|
||||
const {result:{control}}=await player.chooseControl(list,'cancel2')
|
||||
.set('prompt',get.prompt('dddzhengjun',target))
|
||||
.set('prompt2','令'+get.translation(target)+'执行其中一项')
|
||||
.set('ai',()=>{
|
||||
const player=get.event('player'),target=get.event().getTrigger().player;
|
||||
if(get.event('controls').includes('弃牌')&&get.effect(target,{name:'guohe_copy2'},player,player)>0) return '弃牌';
|
||||
return get.effect(target,{name:'draw'},player,player)>0?'摸牌':'cancel2';
|
||||
});
|
||||
if(control!='cancel2'){
|
||||
map.hs_target=[target,control];
|
||||
}
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
player.logSkill('dddzhengjun_hp',target);
|
||||
target[result.control=='失去体力'?'loseHp':'draw']();
|
||||
}
|
||||
},
|
||||
if(es_targets.length){
|
||||
let target;
|
||||
if(hs_targets.length==1){
|
||||
const {result:{bool}}=await player.chooseBool()
|
||||
.set('prompt',get.prompt('dddzhengjun',hs_targets[0]))
|
||||
.set('prompt2','移动'+get.translation(hs_targets[0])+'的一张装备牌')
|
||||
.set('choice',()=>player.canMoveCard(true,true,hs_targets[0]));
|
||||
if(bool) target=hs_targets[0];
|
||||
}
|
||||
else{
|
||||
let targets=await player.chooseTarget(get.prompt('dddzhengjun'),'移动其中一名角色的一张装备牌',(card,player,target)=>{
|
||||
return get.event('targets').includes(target);
|
||||
}).set('ai',target=>{
|
||||
const player=get.event('player');
|
||||
return player.canMoveCard(true,true,target)?(1+Math.random()):0;
|
||||
}).set('targets',es_targets).forResultTargets();
|
||||
if(targets&&targets.length) target=targets[0];
|
||||
}
|
||||
if(target){
|
||||
map.es_target=target;
|
||||
}
|
||||
}
|
||||
event.result={
|
||||
bool:(map.hs_target||map.es_target),
|
||||
targets:[(map.hs_target||[])[0]].concat(map.es_target?[map.es_target]:[]),
|
||||
cost_data:map,
|
||||
};
|
||||
}
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
const data=event.cost_data;
|
||||
if(trigger.name=='damage'||trigger.name=='loseHp'||trigger.name=='recover'){
|
||||
player.addTempSkill('dddzhengjun_hp','phaseUseAfter');
|
||||
await trigger.player[data=='回复体力'?'recover':'loseHp']();
|
||||
}
|
||||
else{
|
||||
if(data.hs_target){
|
||||
player.addTempSkill('dddzhengjun_hs','phaseUseAfter');
|
||||
if(data.hs_target[1]=='摸牌') await data.hs_target[0].draw();
|
||||
else await data.hs_target[0].chooseToDiscard('he',true);
|
||||
}
|
||||
if(data.es_target){
|
||||
player.addTempSkill('dddzhengjun_es','phaseUseAfter');
|
||||
await player.moveCard(true,data.es_target);
|
||||
}
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
hs:{charlotte:true},
|
||||
es:{charlotte:true},
|
||||
hp:{charlotte:true},
|
||||
},
|
||||
},
|
||||
dddxianxi:{
|
||||
|
|
1734
character/diy.js
1734
character/diy.js
File diff suppressed because it is too large
Load Diff
|
@ -357,7 +357,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
node.link=item;
|
||||
|
||||
const func=function(node,item){
|
||||
if(item!='unknown') node.setBackground(item,'character');
|
||||
const currentPlayer=game.findPlayer(current=>current.getSeatNum()==seat);
|
||||
if(currentPlayer.classList.contains('unseen_show')) node.setBackground('hidden_image','character');
|
||||
else if(item!='unknown') node.setBackground(item,'character');
|
||||
if(node.node){
|
||||
node.node.name.remove();
|
||||
node.node.hp.remove();
|
||||
|
@ -370,7 +372,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
group:ui.create.div('.identity',node),
|
||||
intro:ui.create.div('.intro',node),
|
||||
};
|
||||
const currentPlayer=game.findPlayer(current=>current.getSeatNum()==seat);
|
||||
const infoitem=[currentPlayer.sex,currentPlayer.group,`${currentPlayer.hp}/${currentPlayer.maxHp}/${currentPlayer.hujia}`];
|
||||
node.node.name.innerHTML=get.slimName(item);
|
||||
if(lib.config.buttoncharacter_style=='default'||lib.config.buttoncharacter_style=='simple'){
|
||||
|
@ -2118,6 +2119,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else if(lib.translate[name+'_info']){
|
||||
str+=(''+lib.translate[name+'_info']+'|');
|
||||
}
|
||||
if(lib.translate[name+'_append']){
|
||||
str+=(''+lib.translate[name+'_append']+'|');
|
||||
}
|
||||
if(get.is.yingbianConditional(node)){
|
||||
const yingbianEffects=get.yingbianEffects(node);
|
||||
if(!yingbianEffects.length){
|
||||
|
@ -5459,11 +5463,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
effect:{
|
||||
target(card,player,target){
|
||||
if(get.tag(card,'damage')&&target.hp>(player.hasSkillTag('damageBonus',true,{
|
||||
if(!target._new_guixin_eff&&get.tag(card,'damage')&&target.hp>(player.hasSkillTag('damageBonus',true,{
|
||||
card:card,
|
||||
target:target
|
||||
})?2:1)){
|
||||
if(player.hasSkillTag('jueqing',false,target)) return [1,-2];
|
||||
target._new_guixin_eff=true;
|
||||
let gain=game.countPlayer(function(current){
|
||||
if(target==current) return 0;
|
||||
if(get.attitude(target,current)>0){
|
||||
|
@ -5476,6 +5481,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
if(target.isTurnedOver()) gain+=2.3;
|
||||
else gain-=2.3;
|
||||
delete target._new_guixin_eff;
|
||||
return [1,Math.max(0,gain)];
|
||||
}
|
||||
}
|
||||
|
@ -6286,11 +6292,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
effect:{
|
||||
target(card,player,target){
|
||||
if(get.tag(card,'damage')&&target.hp>(player.hasSkillTag('damageBonus',true,{
|
||||
if(!target._guixin_eff&&get.tag(card,'damage')&&target.hp>(player.hasSkillTag('damageBonus',true,{
|
||||
card:card,
|
||||
target:target
|
||||
})?2:1)){
|
||||
if(player.hasSkillTag('jueqing',false,target)) return [1,-2];
|
||||
target._guixin_eff=true;
|
||||
let gain=game.countPlayer(function(current){
|
||||
if(target==current) return 0;
|
||||
if(get.attitude(target,current)>0){
|
||||
|
@ -6303,6 +6310,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
if(target.isTurnedOver()) gain+=2.3;
|
||||
else gain-=2.3;
|
||||
delete target._guixin_eff;
|
||||
return [1,Math.max(0,gain)];
|
||||
}
|
||||
}
|
||||
|
@ -8563,7 +8571,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
zhengqing_info:'锁定技。一轮游戏开始时,你移去所有角色的“擎”标记,令上一轮于一回合内造成伤害值最多的角色各获得X枚“擎”,且你与这些角色各摸一张牌(X为这些角色该回合内造成的伤害值)。若该角色为你且本次获得的“擎”数为本局游戏最多的一次,你改为摸X张牌(至多摸五张)。',
|
||||
zhuangpo:'壮魄',
|
||||
zhuangpo_info:'你可以将牌名为【杀】或牌面信息中包含“【杀】”的牌当【决斗】使用,然后你获得如下效果:1.当此【决斗】指定目标后,若你有“擎”,你可以移去任意枚“擎”,令目标角色弃置等量的牌;2.当你造成渠道为此牌的伤害时,若此牌的所有目标角色中存在有“擎”的角色,此伤害+1。',
|
||||
|
||||
|
||||
extra_feng:'神话再临·风',
|
||||
extra_huo:'神话再临·火',
|
||||
|
|
|
@ -477,7 +477,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
const result=await player.chooseTarget(get.prompt('dczhenrao'),'对一名可选角色造成1点伤害',(card,player,target)=>{
|
||||
return get.event('targets').includes(target);
|
||||
return get.event('targets').includes(target)&&!player.getStorage('dczhenrao').includes(target);
|
||||
})
|
||||
.set('targets',trigger.targets.concat(trigger.player).filter(target=>target.countCards('h')>player.countCards('h')))
|
||||
.set('ai',target=>{
|
||||
|
@ -2032,13 +2032,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
trigger:{player:'useCardAfter'},
|
||||
filter:function(event,player){
|
||||
if(get.type(event.card)!='basic') return false;
|
||||
if(player.getHistory('gain',evt=>{
|
||||
return evt.getParent().name==='dccaisi';
|
||||
}).reduce((num,evt)=>{
|
||||
return num+evt.cards.length;
|
||||
},0)>player.maxHp) return false;
|
||||
return _status.currentPhase;
|
||||
return get.type(event.card)=='basic'&&_status.currentPhase;
|
||||
},
|
||||
prompt2:function(event,player){
|
||||
const num=player.countMark('dccaisi_more')+1;
|
||||
|
@ -2054,13 +2048,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(card) cards.add(card);
|
||||
else break;
|
||||
}
|
||||
if(cards.length) player.gain(cards,'gain2');
|
||||
if(cards.length) yield player.gain(cards,'gain2');
|
||||
else{
|
||||
player.chat('没有非基本牌…');
|
||||
game.log(`但是${position=='discardPile'?'弃':''}牌堆里没有非基本牌!`);
|
||||
}
|
||||
player.addTempSkill('dccaisi_more');
|
||||
player.addMark('dccaisi_more',1,false);
|
||||
const sum=player.getHistory('useSkill',evt=>evt.skill=='dccaisi').length;
|
||||
if(sum<player.maxHp){
|
||||
player.addTempSkill('dccaisi_more');
|
||||
player.addMark('dccaisi_more',1,false);
|
||||
}
|
||||
else player.tempBanSkill('dccaisi');
|
||||
},
|
||||
subSkill:{more:{charlotte:true,onremove:true}},
|
||||
},
|
||||
|
@ -2073,10 +2071,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function*(event,map){
|
||||
const player=map.player;
|
||||
if(player.maxHp<game.countPlayer()){
|
||||
if(player.maxHp<game.countPlayer2()){
|
||||
yield player.gainMaxHp();
|
||||
}
|
||||
player.recover();
|
||||
yield player.recover();
|
||||
}
|
||||
},
|
||||
//魏贾充
|
||||
|
@ -2861,7 +2859,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.logSkill('dcmanzhi',target);
|
||||
if(result.control=='选项一'){
|
||||
player.addTempSkill('dcmanzhi_1');
|
||||
target.chooseCard(2,'he','蛮智:请交给'+get.translation(player)+'两张牌',true);
|
||||
target.chooseCard(Math.min(2,target.countCards('he')),'he','蛮智:请交给'+get.translation(player)+'两张牌',true);
|
||||
}
|
||||
else{
|
||||
player.addTempSkill('dcmanzhi_2');
|
||||
|
@ -4476,7 +4474,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
return Math.random();
|
||||
});
|
||||
}).set('complexTarget', true);
|
||||
}
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
|
@ -5339,10 +5337,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
check:function(event,player){
|
||||
var num=player.getDamagedHp()-1;
|
||||
if(num<=0) return false;
|
||||
var list=game.filterPlayer().map(target=>{
|
||||
return get.attitude(player,target)*Math.pow(Math.max(0,target.maxHp-target.countCards('h')-1),2);
|
||||
}).sort((a,b)=>b-a);
|
||||
return list.slice(0,num).reduce((p,c)=>p+c,0)>0;
|
||||
return game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)>0&&target.maxHp-target.countCards('h')>1;
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -5350,7 +5347,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 1'
|
||||
var num=player.getDamagedHp();
|
||||
if(!player.isIn()||!num) event.finish();
|
||||
else player.chooseTarget('御关:令'+get.cnNumber(num)+'名角色将手牌摸至体力上限',Math.min(game.countPlayer(),num),true).set('ai',target=>{
|
||||
else player.chooseTarget('御关:令'+get.cnNumber(num)+'名角色将手牌摸至体力上限',Math.min(game.countPlayer(),[1,num]),true).set('ai',target=>{
|
||||
return get.attitude(_status.event.player,target)*Math.max(0.1,target.maxHp-target.countCards('h'));
|
||||
});
|
||||
'step 2'
|
||||
|
@ -7098,6 +7095,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
player.showCards(cards,get.translation(player)+'发动了【数合】');
|
||||
player.addMark('dcliehou',1);
|
||||
'step 1'
|
||||
event.cards2=[];
|
||||
var num1=get.number(cards[0],player);
|
||||
|
@ -7138,7 +7136,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var target=result.targets[0];
|
||||
player.line(target,'green');
|
||||
player.give(cards,target);
|
||||
player.addMark('dcliehou',1);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
@ -9903,7 +9900,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(th>0){
|
||||
event.num=Math.ceil(th/2);
|
||||
var list=[
|
||||
'本回合不能使用或打出手牌,然后'+str+'摸两张牌',
|
||||
'本回合不能使用手牌,然后'+str+'摸两张牌',
|
||||
'展示所有手牌,并将其中一种花色的所有牌交给'+str,
|
||||
'弃置'+get.cnNumber(event.num)+'张手牌',
|
||||
];
|
||||
|
@ -9946,11 +9943,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subSkill:{
|
||||
block:{
|
||||
mark:true,
|
||||
intro:{content:'不能使用或打出手牌'},
|
||||
intro:{content:'不能使用手牌'},
|
||||
charlotte:true,
|
||||
mod:{
|
||||
cardEnabled2:function(card){
|
||||
if(get.position(card)=='h') return false;
|
||||
cardEnabled:function(card,player){
|
||||
let hs=player.getCards('h'),cards=[card];
|
||||
if(Array.isArray(card.cards)) cards.addArray(card.cards);
|
||||
for(let i of cards){
|
||||
if(hs.includes(i)) return false;
|
||||
}
|
||||
},
|
||||
cardSavable:function(card,player){
|
||||
let hs=player.getCards('h'),cards=[card];
|
||||
if(Array.isArray(card.cards)) cards.addArray(card.cards);
|
||||
for(let i of cards){
|
||||
if(hs.includes(i)) return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -11900,7 +11908,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
var target=trigger.player;
|
||||
event.target=target;
|
||||
if(target.getHistory('sourceDamage').length>0&&player.canUse('juedou',target)){
|
||||
if(target.getHistory('useCard',evt=>get.color(evt.card)=='black').length>0&&player.canUse('juedou',target)){
|
||||
player.useCard({name:'juedou',isCard:true},target,'dcxunji_effect');
|
||||
}
|
||||
'step 1'
|
||||
|
@ -12412,7 +12420,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
furongfuqian:'傅肜(?-222年),义阳(今湖北枣阳)人,三国时蜀汉将领。刘备攻伐吴国时,傅肜为别督。后刘备被陆逊击败,傅肜率部断后,奋战至死。死前怒斥道:“吴狗!何有汉将军降者!”<br>傅佥[qiān] ( ? ~263年),义阳(治今湖北省枣阳市)人,蜀汉将领傅彤之子,三国时期蜀汉名将。金长于谋略,并颇有胆勇,姜维甚爱之。傅佥官至关中都督。魏国攻伐蜀汉时,傅佥和蒋舒防守阳安关,兵败战死。',
|
||||
qinlang:'秦朗(生卒年不详),字元明,小字阿蘇(一作阿鳔),新兴(治今山西忻州)云中人。三国时期曹魏将领,官至骁骑将军、给事中,曾率兵讨伐鲜卑轲比能和步度根的叛军。',
|
||||
xianglang:'向朗(约167年—247年),字巨达。襄阳郡宜城县(今湖北宜城)人,三国时期蜀汉官员、藏书家、学者。向朗早年师从于司马徽,并被荆州牧刘表任命为临沮县长。后随刘备入蜀,历任巴西、牂牁、房陵太守,并拜步兵校尉,领丞相长史,随丞相诸葛亮北伐。因包庇马谡被免职,后为光禄勋,转左将军、特进,封显明亭侯。曾代理丞相册封张皇后及太子刘璿。晚年专心研究典籍,诱导青年学习,家中藏书丰富,受到举国尊重。延熙十年(247年),向朗去世。《全三国文》收录有一篇《遗言戒子》',
|
||||
yuantanyuanxiyuanshang:'袁谭袁尚介绍请移步「袁谭袁尚」,此处为袁熙的介绍。<br>袁熙(?-207年),字显奕(《后汉书》、《东光世系》作显雍),汝南郡汝阳县(今河南商水)人,是东汉末年占据河北的军阀袁绍次子,袁绍打败公孙瓒后,令袁熙为幽州刺史。袁绍官渡兵败后不久病死,其兄长袁谭、弟弟袁尚各自独立,互相攻伐,曹操趁机进攻袁谭、袁尚,并逐渐占河北。袁熙接纳兵败的袁尚后,因为属下叛变而逃往乌桓,被曹操击败后,逃往辽东太守公孙康帐下,却被公孙康杀死,二人首级被献给曹操。',
|
||||
yuantanyuanxiyuanshang:'袁谭、袁尚的武将介绍请移步「袁谭袁尚」,此处为袁熙的介绍。<br>袁熙(?-207年),字显奕(《后汉书》、《东光世系》作显雍),汝南郡汝阳县(今河南商水)人,是东汉末年占据河北的军阀袁绍次子,袁绍打败公孙瓒后,令袁熙为幽州刺史。袁绍官渡兵败后不久病死,其兄长袁谭、弟弟袁尚各自独立,互相攻伐,曹操趁机进攻袁谭、袁尚,并逐渐占河北。袁熙接纳兵败的袁尚后,因为属下叛变而逃往乌桓,被曹操击败后,逃往辽东太守公孙康帐下,却被公孙康杀死,二人首级被献给曹操。',
|
||||
zhanghu:'张虎,生卒年不详,雁门马邑(今山西朔城区大夫庄)人。张辽之子,三国时期曹魏武将。官至偏将军,封晋阳侯,有一子张统。',
|
||||
mengjie:'孟节,南中蛮王孟获之兄。是小说《三国演义》中杜撰的人物,史上并无记载。诸葛亮南征孟获之时,帐下军士因误饮哑泉之水失语。当地山神告知诸葛亮,言万安溪畔有一高士隐居彼处,号“万安隐者”。其草庵后有一泉,名安乐泉,可解哑泉之毒。庵前生有一草,名薤叶芸香,可防瘴气之染。诸葛亮于是带人连夜前往其隐居之处,求得泉水草叶解毒防瘴,拜求隐士姓名,方知其名为孟节,由此而叹:“方信盗跖、下惠之事,今亦有之。”诸葛亮欲申奏刘禅,立其为王,孟节辞之。又以金帛赠之,孟节坚辞不受。诸葛亮嗟叹不已,拜别而回。',
|
||||
peiyuanshao:'裴元绍,《三国演义》人物,原黄巾军之武将。黄巾起义失败之后,与周仓一同率领残部在山中落草当山贼。公元200年,在关羽欲返刘备旗下,在突破曹操的五道关卡后路过其落草之地,与周仓一同向关羽要求能以期成为关羽家臣。但此时仅周仓同行,其他弟兄则于山中等待。不久后,因其欲夺偶然路过的赵云之马,反遭讨伐战败身死。',
|
||||
|
@ -12536,7 +12544,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
recangchu:'仓储',
|
||||
recangchu2:'仓储',
|
||||
recangchu3:'仓储',
|
||||
recangchu_info:'锁定技,游戏开始时,你获得3个“粮”。你的手牌上限+X(X为“粮”数)。当你于回合外得到后时,你获得一个“粮”。(你的“粮”数不能超过存活角色数)',
|
||||
recangchu_info:'锁定技。①游戏开始时,你获得3个“粮”。你的手牌上限+X(X为“粮”数)。②每回合限一次,当你于回合外得到牌后,你获得一个“粮”。(你的“粮”数不能超过存活角色数)',
|
||||
reliangying:'粮营',
|
||||
reliangying_info:'弃牌阶段开始时,你可以摸至多X张牌,然后交给等量的角色各一张牌。(X为你的“粮”数)',
|
||||
reshishou:'失守',
|
||||
|
@ -12550,7 +12558,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
zhuangdan_info:'锁定技,其他角色的回合结束时,若你的手牌数为全场唯一最多,则你令〖裂胆〗失效直到你下回合结束。',
|
||||
dc_caiyang:'蔡阳',
|
||||
dcxunji:'寻嫉',
|
||||
dcxunji_info:'出牌阶段限一次,你可以选择一名其他角色。该角色的下个结束阶段开始时,若其于该回合内造成过伤害,则你视为对其使用一张【决斗】,且当此【决斗】对其造成伤害后,其对你造成等量的伤害。',
|
||||
dcxunji_info:'出牌阶段限一次,你可以选择一名其他角色。该角色的下个结束阶段开始时,若其此回合使用过黑色牌,则你视为对其使用一张【决斗】,且当此【决斗】对其造成伤害后,其对你造成等量的伤害。',
|
||||
dcjiaofeng:'交锋',
|
||||
dcjiaofeng_info:'锁定技。每回合限一次,当你造成伤害时,若你本回合内未造成过其他伤害且你已损失的体力值:大于0,则你摸一张牌;大于1,则此伤害+1;大于2,则你回复1点体力。',
|
||||
zhoushan:'周善',
|
||||
|
@ -12715,7 +12723,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xingchong:'幸宠',
|
||||
xingchong_info:'一轮游戏开始时,你可声明两个自然数X和Y,且(X+Y)≤min(5, 你的体力上限)。你摸X张牌并展示Y张手牌。若如此做,当你于本轮内失去一张以此法展示的牌后,你摸两张牌。',
|
||||
liunian:'流年',
|
||||
liunian_info:'锁定技。回合结束时,若本回合内进行了本次游戏的第一次洗牌,则你加1点体力上限;若本回合内进行了本次游戏的第二次洗牌,则你于本回合结束时回复1点体力,且本局游戏内的手牌上限+10。',
|
||||
liunian_info:'锁定技。一名角色的回合结束时,若本回合内进行了本次游戏的第一次洗牌,则你加1点体力上限;若本回合内进行了本次游戏的第二次洗牌,则你于本回合结束时回复1点体力,且本局游戏内的手牌上限+10。',
|
||||
caimaozhangyun:'蔡瑁张允',
|
||||
lianzhou:'连舟',
|
||||
lianzhou_info:'锁定技。准备阶段,你横置你的武将牌。然后你可横置任意名体力值等于你的角色。',
|
||||
|
@ -12750,7 +12758,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
qinbao_info:'锁定技。当你使用【杀】或普通锦囊牌时,你令所有手牌数不小于你的角色不能响应此牌。',
|
||||
dc_lvkuanglvxiang:'吕旷吕翔',
|
||||
dcshuhe:'数合',
|
||||
dcshuhe_info:'出牌阶段限一次,你可以展示一张手牌。若场上有与此牌点数相同的牌,则你获得这些牌;否则你将此牌交给一名其他角色并获得一枚“爵”。',
|
||||
dcshuhe_info:'出牌阶段限一次,你可以展示一张手牌并获得一枚“爵”。若场上有与此牌点数相同的牌,则你获得这些牌;否则你将此牌交给一名其他角色。',
|
||||
dcliehou:'列侯',
|
||||
dcliehou_info:'锁定技。摸牌阶段开始时,你令额定摸牌数+X;然后此摸牌阶段结束时,你选择一项:⒈弃置X张牌。⒉失去1点体力(X为你的“爵”数+1且至多为5)。',
|
||||
yinfuren:'尹夫人',
|
||||
|
@ -12803,7 +12811,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcjianshu_info:'出牌阶段限一次。你可以将一张黑色手牌交给一名其他角色,并选择另一名其他角色,你令前者与后者拼点。赢的角色随机弃置一张牌,没赢的角色失去1点体力。若有角色因此死亡,你令你〖间书〗于此阶段发动的次数上限+1。',
|
||||
dcyongdi:'拥嫡',
|
||||
dcyongdi_info:'限定技。出牌阶段,你可以选择一名男性角色,若其:体力上限最少,其加1点体力上限;体力值最少,其回复1点体力;手牌数最少,其摸X张牌(X为其体力上限且至多为5)。',
|
||||
liupi:'刘辟',
|
||||
liupi:'新杀刘辟',
|
||||
liupi_prefix:'新杀',
|
||||
dcjuying:'踞营',
|
||||
dcjuying_info:'出牌阶段结束时,若你于此阶段内使用【杀】的次数未达到上限,你可以选择任意项:1.下回合使用【杀】的次数上限+1;2.本回合手牌上限+2;3.摸三张牌。若你选择的项数超过了你的体力值,你弃置一张牌。',
|
||||
dc_huanghao:'新杀黄皓',
|
||||
|
@ -12826,7 +12835,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcxuewei:'血卫',
|
||||
dcxuewei_info:'结束阶段,你可以选择一名体力值不大于你的角色,然后你获得如下效果直到你的下回合开始时:当其受到伤害时,防止此伤害,然后你失去1点体力,你与其各摸一张牌(若该角色为你,则改为你摸一张牌)。',
|
||||
dcyuguan:'御关',
|
||||
dcyuguan_info:'一名角色的回合结束时,若你已损失的体力值为全场最多,你可以减1点体力上限,然后令X名角色将手牌摸至体力上限(X为你已损失的体力值)。',
|
||||
dcyuguan_info:'一名角色的回合结束时,若你已损失的体力值为全场最多,你可以减1点体力上限,然后令至多X名角色将手牌摸至体力上限(X为你已损失的体力值)。',
|
||||
qinlang:'秦朗',
|
||||
dchaochong:'昊宠',
|
||||
dchaochong_info:'当你使用牌后,你可以将手牌摸至或弃置至你的手牌上限数(至多摸五张)。然后若你以此法:得到牌,你的手牌上限-1;失去牌,你的手牌上限+1。',
|
||||
|
@ -12954,9 +12963,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcshizong_info:'当你需要使用一张基本牌时,你可以交给一名其他角色X张牌,然后其可以将一张牌置于牌堆底,视为你使用之。若其不为当前回合角色,此技能失效直到回合结束(X为你本回合发动〖恃纵〗的次数)。',
|
||||
pangshanmin:'庞山民',
|
||||
dccaisi:'才思',
|
||||
dccaisi_info:'当你于回合内/回合外使用基本牌结算结束后,若你本回合以此法得到的牌数小于你的体力上限,你可以从牌堆/弃牌堆随机获得一张非基本牌,然后本回合发动此技能获得的牌数+1。',
|
||||
dccaisi_info:'当你于回合内/回合外使用基本牌结算结束后,你可以从牌堆/弃牌堆随机获得一张非基本牌,然后若你本回合发动此技能的次数:小于你的体力上限,本回合你发动此技能获得的牌数+1;大于等于你的体力上限,本回合此技能失效。',
|
||||
dczhuoli:'擢吏',
|
||||
dczhuoli_info:'锁定技。一名角色的回合结束时,若你本回合使用或获得的牌数大于体力值,你加1点体力上限(不能超过存活角色数),回复1点体力。',
|
||||
dczhuoli_info:'锁定技。一名角色的回合结束时,若你本回合使用或获得的牌数大于体力值,你加1点体力上限(不能超过游戏人数),回复1点体力。',
|
||||
yue_caiyong:'乐蔡邕',
|
||||
yue_caiyong_prefix:'乐',
|
||||
dcjiaowei:'焦尾',
|
||||
|
|
|
@ -5861,23 +5861,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
str=get.prompt(event.skill,trigger[info.logTarget],player);
|
||||
}
|
||||
else if(typeof info.logTarget=='function'){
|
||||
var logTarget=info.logTarget(trigger,player);
|
||||
var logTarget=info.logTarget(trigger,player,trigger.triggername,trigger.indexedData);
|
||||
if(get.itemtype(logTarget).indexOf('player')==0) str=get.prompt(event.skill,logTarget,player);
|
||||
}
|
||||
else{
|
||||
str=get.prompt(event.skill,null,player);
|
||||
}
|
||||
}
|
||||
if(typeof str=='function'){str=str(trigger,player)}
|
||||
if(typeof str=='function'){str=str(trigger,player,trigger.triggername,trigger.indexedData)}
|
||||
var next=player.chooseBool('评鉴:'+str);
|
||||
next.set('yes',!info.check||info.check(trigger,player));
|
||||
next.set('yes',!info.check||info.check(trigger,player,trigger.triggername,trigger.indexedData));
|
||||
next.set('hsskill',event.skill);
|
||||
next.set('forceDie',true);
|
||||
next.set('ai',function(){
|
||||
return _status.event.yes;
|
||||
});
|
||||
if(typeof info.prompt2=='function'){
|
||||
next.set('prompt2',info.prompt2(trigger,player));
|
||||
next.set('prompt2',info.prompt2(trigger,player,trigger.triggername,trigger.indexedData));
|
||||
}
|
||||
else if(typeof info.prompt2=='string'){
|
||||
next.set('prompt2',info.prompt2);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -13,12 +13,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ol_gaoshun:['male','qun',4,['olxianzhen','decadejinjiu'],['die_audio:re_gaoshun']],
|
||||
ol_sb_yuanshao:['male','qun',4,['olsbhetao','olsbshenli','olsbyufeng','olsbshishou'],['zhu']],
|
||||
ol_yufan:['male','wu',3,['olzongxuan','olzhiyan'],['tempname:re_yufan','die_audio:re_yufan']],
|
||||
ol_chengpu:['male','wu',4,['ollihuo','olchunlao'],['tempname:xin_chengpu','die_audio:xin_chengpu']],
|
||||
ol_chengpu:['male','wu',4,['dclihuo','olchunlao'],['tempname:xin_chengpu','die_audio:xin_chengpu']],
|
||||
ol_wangyi:['female','wei',3,['olzhenlie','olmiji']],
|
||||
},
|
||||
characterSort:{
|
||||
onlyOL:{
|
||||
onlyOL_yijiang1:['ol_jianyong','ol_lingtong','ol_gaoshun'],
|
||||
onlyOL_yijiang2:['ol_caozhang','ol_chengpu'],
|
||||
onlyOL_yijiang2:['ol_caozhang','ol_chengpu','ol_wangyi'],
|
||||
onlyOL_yijiang3:['ol_yufan'],
|
||||
onlyOL_sb:['ol_sb_jiangwei','ol_sb_guanyu','ol_sb_taishici','ol_sb_yuanshao'],
|
||||
},
|
||||
|
@ -51,8 +52,103 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
skill:{
|
||||
//王异
|
||||
olzhenlie:{
|
||||
audio:2,
|
||||
inherit:'zhenlie',
|
||||
async content(event,trigger,player){
|
||||
const target=trigger.player;
|
||||
if(get.attitude(player,target)<0&&target.countDiscardableCards(player,'he')) player.addTempSkill('zhenlie_lose');
|
||||
await player.loseHp();
|
||||
player.removeSkill('zhenlie_lose');
|
||||
trigger.getParent().excluded.add(player);
|
||||
if(!player.isIn()) return;
|
||||
const goon=target.hasCard(card=>{
|
||||
if(get.position(card)=='h') return true;
|
||||
return lib.filter.canBeGained(card,player,target);
|
||||
},'he');
|
||||
if(goon||player.isDamaged()){
|
||||
let result;
|
||||
if(goon&&player.isDamaged()) result=await player.chooseControl().set('choiceList',[
|
||||
'获得'+get.translation(target)+'的一张牌',
|
||||
'发动一次〖秘计〗',
|
||||
]).set('ai',()=>{
|
||||
const player=get.event('player'),target=get.event().getTrigger().player;
|
||||
return get.effect(target,{name:'shunshou_copy2'},player,player)>get.effect(player,{name:'draw'},player,player)*player.getDamagedHp()?0:1
|
||||
}).forResult();
|
||||
else result={index:goon?0:1};
|
||||
if(result.index==0){
|
||||
await player.gainPlayerCard(target,'he',true);
|
||||
}
|
||||
else{
|
||||
await player.useSkill('olmiji');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
olmiji:{
|
||||
audio:2,
|
||||
trigger:{player:'phaseJieshuBegin'},
|
||||
filter(event,player){
|
||||
return player.isDamaged();
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
let num=player.getDamagedHp();
|
||||
await player.draw(num);
|
||||
if(player.countCards('he')&&game.hasPlayer(target=>target!=player)){
|
||||
if(_status.connectMode) game.broadcastAll(()=>_status.noclearcountdown=true);
|
||||
let given_map=[];
|
||||
while(num>0&&player.hasCard(card=>!card.hasGaintag('olsujian_given'),'he')){
|
||||
const {result:{bool,cards,targets}}=await player.chooseCardTarget({
|
||||
filterCard(card,player){
|
||||
return !card.hasGaintag('olsujian_given');
|
||||
},
|
||||
selectCard:[1,num],
|
||||
position:'he',
|
||||
filterTarget:lib.filter.notMe,
|
||||
prompt:'秘计:请选择要分配的卡牌和目标',
|
||||
prompt2:'(还可分配'+num+'张)',
|
||||
ai1(card){
|
||||
return (!ui.selected.cards.length&&card.name=='du')?1:0;
|
||||
},
|
||||
ai2(target){
|
||||
const player=get.event('player');
|
||||
const card=ui.selected.cards[0];
|
||||
if(card) return get.value(card,target)*get.attitude(player,target);
|
||||
return 0;
|
||||
},
|
||||
});
|
||||
if(bool){
|
||||
num-=cards.length;
|
||||
const target=targets[0];
|
||||
if(given_map.some(i=>i[0]==target)){
|
||||
given_map[given_map.indexOf(given_map.find(i=>i[0]==target))][1].addArray(cards);
|
||||
}
|
||||
else given_map.push([target,cards]);
|
||||
player.addGaintag(cards,'olsujian_given');
|
||||
}
|
||||
else break;
|
||||
}
|
||||
if(_status.connectMode){
|
||||
game.broadcastAll(()=>{
|
||||
delete _status.noclearcountdown;
|
||||
game.stopCountChoose();
|
||||
});
|
||||
}
|
||||
if(given_map.length){
|
||||
await game.loseAsync({
|
||||
gain_list:given_map,
|
||||
player:player,
|
||||
cards:given_map.slice().map(list=>list[1]),
|
||||
giver:player,
|
||||
animate:'giveAuto',
|
||||
}).setContent('gaincardMultiple');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
//程普
|
||||
ollihuo:{
|
||||
dclihuo:{
|
||||
audio:'relihuo',
|
||||
trigger:{player:'useCard1'},
|
||||
filter(event,player){
|
||||
|
@ -103,12 +199,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
},
|
||||
ai:{fireAttack:true},
|
||||
group:'ollihuo_add',
|
||||
group:'dclihuo_add',
|
||||
subSkill:{
|
||||
add:{
|
||||
inherit:'lihuo2',
|
||||
async content(event,trigger,player){
|
||||
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('ollihuo'),'为'+get.translation(trigger.card)+'增加一个目标',(card,player,target)=>{
|
||||
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('dclihuo'),'为'+get.translation(trigger.card)+'增加一个目标',(card,player,target)=>{
|
||||
const trigger=get.event().getTrigger();
|
||||
return !trigger.targets.includes(target)&&player.canUse(trigger.card,target);
|
||||
}).set('card',trigger.card).set('ai',target=>{
|
||||
|
@ -116,7 +212,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.effect(target,trigger.card,player,player);
|
||||
});
|
||||
if(bool){
|
||||
player.logSkill('ollihuo',targets);
|
||||
player.logSkill('dclihuo',targets);
|
||||
trigger.targets.addArray(targets);
|
||||
}
|
||||
},
|
||||
|
@ -248,9 +344,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
const {result:{bool,targets}}=await player.chooseTarget(get.prompt2('olzhiyan')).set('ai',target=>{
|
||||
const player=get.event('player'),cards=get.event('cards');
|
||||
if(!cards.length) return 0;
|
||||
const card=cards[0];
|
||||
if(get.type(card,target)=='equip'&&(get.attitude(player,target)>0||get.recoverEffect(target,player,player)>0)) return get.recoverEffect(target,player,player)+get.attitude(player,target);
|
||||
if(get.type(card,target)!='equip'&&target.getHp()>=player.getHp()&&get.effect(target,{name:'losehp'},player,player)>0) return get.effect(target,{name:'losehp'},player,player);
|
||||
const card=cards[0],att=get.attitude(player,target);
|
||||
if(get.type(card,target)=='equip'&&(get.attitude(player,target)>0||get.recoverEffect(target,player,player)>0)) return get.recoverEffect(target,player,player)*20+att/114514;
|
||||
if(get.type(card,target)!='equip'){
|
||||
if(target.getHp()>=player.getHp()) return get.effect(target,{name:'losehp'},player,player)*20-att/114514;
|
||||
return get.effect(target,{name:'draw'},player,player);
|
||||
}
|
||||
return 0;
|
||||
}).set('cards',Array.from(ui.cardPile.childNodes||[])||[]);
|
||||
if(bool){
|
||||
|
@ -718,8 +817,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
if(get.type(trigger.card)=='basic'&&player.getHistory('useCard',evt=>get.type(evt.card)=='basic').indexOf(trigger)==0){
|
||||
game.log(trigger.card,'不计入次数上限');
|
||||
trigger.addCount=false;
|
||||
if(player.stat[player.stat.length-1].card.sha>0) player.stat[player.stat.length-1].card.sha--;
|
||||
if (trigger.addCount !== false) {
|
||||
trigger.addCount=false;
|
||||
const stat = player.stat[player.stat.length-1].card;
|
||||
if (typeof stat[trigger.card.name] === 'number') stat[trigger.card.name]--;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -904,11 +1006,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
const goon1=player.countCards('h',card=>get.name(card,player)=='sha')>=player.countCards('h',card=>get.name(card,player)!='sha');
|
||||
const goon2=player.countCards('h',card=>get.name(card,player)!='sha')>=player.countCards('h',card=>get.name(card,player)=='sha');
|
||||
if((goon1&&control=='【杀】更多')||(goon2&&control=='非【杀】更多')){
|
||||
target.popup('判断正确','wood');
|
||||
target.popup('洗具');
|
||||
game.log(target,'猜测','#g正确');
|
||||
}
|
||||
else{
|
||||
target.popup('判断错误','fire');
|
||||
target.popup('杯具');
|
||||
game.log(target,'猜测','#y错误');
|
||||
trigger.increase('num');
|
||||
}
|
||||
|
@ -991,7 +1093,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{player:'phaseJieshuBegin'},
|
||||
prompt2:function(event,player){
|
||||
var str='获得技能';
|
||||
var num=lib.skill.olsbranji.getNum(event,player);
|
||||
var num=lib.skill.olsbranji.getNum(player);
|
||||
if(num>=player.getHp()) str+='【困奋】';
|
||||
if(num==player.getHp()) str+='和';
|
||||
if(num<=player.getHp()) str+='【诈降】';
|
||||
|
@ -1007,7 +1109,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return str;
|
||||
},
|
||||
check:function(event,player){
|
||||
var num=lib.skill.olsbranji.getNum(event,player);
|
||||
var num=lib.skill.olsbranji.getNum(player);
|
||||
if(num==player.getHp()) return true;
|
||||
return player.getHandcardLimit()-player.countCards('h')>=3||player.getDamagedHp()>=2;
|
||||
},
|
||||
|
@ -1018,7 +1120,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var player=map.player;
|
||||
var trigger=map.trigger;
|
||||
player.awakenSkill('olsbranji');
|
||||
var num=lib.skill.olsbranji.getNum(trigger,player);
|
||||
var num=lib.skill.olsbranji.getNum(player);
|
||||
const skills = [];
|
||||
if(num>=player.getHp()){
|
||||
skills.push('kunfen');
|
||||
|
@ -1057,8 +1159,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
getList:function(event){
|
||||
return event.getParent().phaseList.map(list=>list.split('|')[0]);
|
||||
},
|
||||
getNum:function(event,player){
|
||||
return lib.skill.olsbranji.getList(event).slice(0,event.getParent().num).filter(name=>player.getHistory('useCard',evt=>evt.getParent(name).name==name).length).length;
|
||||
getNum:function(player){
|
||||
return player.getHistory('useCard',evt=>{
|
||||
return lib.phaseName.some(name=>{
|
||||
return evt.getParent(name).name==name;
|
||||
});
|
||||
}).reduce((list,evt)=>{
|
||||
return list.add(evt.getParent(lib.phaseName.find(name=>evt.getParent(name).name==name)));
|
||||
},[]).length;
|
||||
},
|
||||
subSkill:{
|
||||
norecover:{
|
||||
|
@ -1264,7 +1372,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ol_sb_taishici:'OL谋太史慈',
|
||||
ol_sb_taishici_prefix:'OL谋',
|
||||
olsbdulie:'笃烈',
|
||||
olsbdulie_info:'每回合限一次,当你成为其他角色使用基本牌或普通锦囊牌的目标时,你可以令此牌额外结算一次。若如此做,此牌结算完毕后,你摸X张牌(X为你的攻击范围且至多为5)。',
|
||||
olsbdulie_info:'每回合限一次,当你成为其他角色使用基本牌或普通锦囊牌的唯一目标时,你可以令此牌额外结算一次。若如此做,此牌结算完毕后,你摸X张牌(X为你的攻击范围且至多为5)。',
|
||||
olsbdouchan:'斗缠',
|
||||
olsbdouchan_info:'锁定技,准备阶段,你从牌堆中获得一张【决斗】,若牌堆没有【决斗】,则你的攻击范围和出牌阶段使用【杀】的次数上限+1(增加次数不超过游戏人数)。',
|
||||
olsbweilin:'威临',
|
||||
|
@ -1298,13 +1406,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
olzhiyan_info:'你或你的上家的结束阶段,你可以令一名角色正面朝上摸一张牌,然后若此牌:为装备牌,则其使用此牌并回复1点体力;不为装备牌且其体力值大于等于你,则其失去1点体力。',
|
||||
ol_chengpu:'OL界程普',
|
||||
ol_chengpu_prefix:'OL界',
|
||||
ollihuo:'疠火',
|
||||
ollihuo_info:'①你使用的非火【杀】可以改为火【杀】,若如此做,此牌结算完毕后,若此牌造成过伤害,则你弃置一张牌或失去1点体力。②你使用火【杀】可以额外指定一个目标。',
|
||||
dclihuo:'疠火',
|
||||
dclihuo_info:'①你使用的非火【杀】可以改为火【杀】,若如此做,此牌结算完毕后,若此牌造成过伤害,则你弃置一张牌或失去1点体力。②你使用火【杀】可以额外指定一个目标。',
|
||||
olchunlao:'醇醪',
|
||||
olchunlao_info:'①当你的【杀】因弃置进入弃牌堆后,你将位于弃牌堆的这些牌称为“醇”置于武将牌上。②一名角色处于濒死状态时,你可以将一张“醇”置入弃牌堆,然后令其视为使用一张【酒】。',
|
||||
ol_wangyi:'OL界王异',
|
||||
ol_wangyi_prefix:'OL界',
|
||||
olzhenlie:'贞烈',
|
||||
olzhenlie_info:'当你成为其他角色使用【杀】或普通锦囊牌的目标后,你可以失去1点体力并令此牌对你无效,然后你选择一项:①获得使用者的一张牌;②发动一次〖秘计〗。',
|
||||
olmiji:'秘计',
|
||||
olmiji_info:'结束阶段,若你已受伤,则你可以摸X张牌,然后你可以将至多X张牌任意分配给其他角色(X为你已损失的体力值)。',
|
||||
|
||||
onlyOL_yijiang1:'OL专属·将1',
|
||||
onlyOL_yijiang2:'OL专属·将2',
|
||||
onlyOL_yijiang3:'OL专属·将3',
|
||||
onlyOL_sb:'OL专属·上兵伐谋',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -137,6 +137,7 @@ window.noname_character_rank={
|
|||
'xia_yuzhenzi',
|
||||
'dc_simashi',
|
||||
'dc_sb_simayi',
|
||||
'caofang',
|
||||
],
|
||||
a:[
|
||||
'star_caoren',
|
||||
|
@ -372,8 +373,12 @@ window.noname_character_rank={
|
|||
'shen_lusu',
|
||||
'huzun',
|
||||
'star_zhangchunhua',
|
||||
'mb_caomao',
|
||||
],
|
||||
am:[
|
||||
'tw_yanliang',
|
||||
'tw_wenchou',
|
||||
'tw_yuantan',
|
||||
'bailingyun',
|
||||
'clan_wuqiao',
|
||||
'muludawang',
|
||||
|
@ -681,6 +686,9 @@ window.noname_character_rank={
|
|||
'ol_sb_guanyu',
|
||||
'gongsunxiu',
|
||||
'dc_caoshuang',
|
||||
'clan_wangling',
|
||||
'clan_wangguang',
|
||||
'lizhaojiaobo',
|
||||
],
|
||||
bp:[
|
||||
'xin_huojun',
|
||||
|
@ -992,6 +1000,7 @@ window.noname_character_rank={
|
|||
'yuanji',
|
||||
'dc_chenqun',
|
||||
'liupi',
|
||||
'ol_liupi',
|
||||
'mazhong',
|
||||
're_mazhong',
|
||||
'tw_baoxin',
|
||||
|
@ -1072,6 +1081,10 @@ window.noname_character_rank={
|
|||
'yangfeng',
|
||||
'sb_xiahoudun',
|
||||
'sb_gaoshun',
|
||||
're_wangyi',
|
||||
'ol_wangyi',
|
||||
'chengji',
|
||||
'mb_sp_guanqiujian',
|
||||
],
|
||||
b:[
|
||||
'junk_guanyu',
|
||||
|
@ -1393,6 +1406,7 @@ window.noname_character_rank={
|
|||
'jsrg_liuyong',
|
||||
'jsrg_sunjun',
|
||||
'xia_shie',
|
||||
'clan_wangmingshan',
|
||||
],
|
||||
bm:[
|
||||
'kongrong',
|
||||
|
@ -2171,8 +2185,15 @@ window.noname_character_rank={
|
|||
'xia_shitao',
|
||||
'bailingyun',
|
||||
'dc_sb_simayi',
|
||||
'caofang',
|
||||
'mb_caomao',
|
||||
],
|
||||
rare:[
|
||||
're_wangyi',
|
||||
'ol_wangyi',
|
||||
'tw_yanliang',
|
||||
'tw_wenchou',
|
||||
'tw_yuantan',
|
||||
'zhugemengxue',
|
||||
'ol_sb_taishici',
|
||||
'clan_wuqiao',
|
||||
|
@ -2602,6 +2623,7 @@ window.noname_character_rank={
|
|||
'xin_caoxiu',
|
||||
'dc_chenqun',
|
||||
'liupi',
|
||||
'ol_liupi',
|
||||
'tw_baoxin',
|
||||
'tw_bingyuan',
|
||||
'tw_chenzhen',
|
||||
|
@ -2645,6 +2667,7 @@ window.noname_character_rank={
|
|||
'furongfuqian',
|
||||
'zhenghun',
|
||||
'clan_wangling',
|
||||
'clan_wangguang',
|
||||
'clan_wangyun',
|
||||
'quhuang',
|
||||
'ol_wenqin',
|
||||
|
@ -2653,6 +2676,10 @@ window.noname_character_rank={
|
|||
'ol_dingshangwan',
|
||||
'ol_liwan',
|
||||
'dc_sb_lusu',
|
||||
'clan_wangmingshan',
|
||||
'chengji',
|
||||
'mb_sp_guanqiujian',
|
||||
'lizhaojiaobo',
|
||||
],
|
||||
junk:[
|
||||
'ol_sb_guanyu',
|
||||
|
|
|
@ -1356,7 +1356,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
olkanpo:{
|
||||
audio:'rekanpo',
|
||||
audioname:['ol_sp_zhugeliang'],
|
||||
audioname:['ol_sp_zhugeliang','ol_pangtong'],
|
||||
trigger:{player:'useCard'},
|
||||
forced:true,
|
||||
locked:false,
|
||||
|
@ -5448,40 +5448,44 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return true;
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(lib.skill.rebingyi.filtery(player)) event.draw=true;
|
||||
if(lib.skill.rebingyi.filterx(player)){
|
||||
player.chooseTarget(get.prompt('xinbingyi'),'展示所有手牌,并选择至多'+get.cnNumber(player.countCards('h'))+'名角色各摸一张牌',[0,player.countCards('h')],function(card,player,target){
|
||||
return true;
|
||||
}).set('ai',function(target){
|
||||
return get.attitude(_status.event.player,target);
|
||||
});
|
||||
async cost(event, trigger, player){
|
||||
const selfDraw = lib.skill.rebingyi.filtery(player), asyncDraw = lib.skill.rebingyi.filterx(player);
|
||||
if (asyncDraw) {
|
||||
const num = player.countCards('h');
|
||||
const result = await player.chooseTarget(
|
||||
get.prompt('xinbingyi'),
|
||||
`展示所有手牌,并选择至多${get.cnNumber(num)}名角色各摸一张牌${selfDraw ? '' : ',然后你摸一张牌'}`,
|
||||
[0,num]
|
||||
).set('ai', function(target){
|
||||
return get.attitude(get.player(), target);
|
||||
}).forResult();
|
||||
if(result.bool) event.result = {
|
||||
bool: result.bool,
|
||||
cost_data: {
|
||||
asyncDraw,
|
||||
selfDraw,
|
||||
targets: result.targets
|
||||
},
|
||||
}
|
||||
}
|
||||
else player.chooseBool(get.prompt('bingyi'),'展示所有手牌').ai=function(){return false};
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.logSkill('rebingyi');
|
||||
player.showHandcards(get.translation(player)+'发动了【秉壹】');
|
||||
event.targets=result.targets;
|
||||
else {
|
||||
event.result = await player.chooseBool(get.prompt('bingyi'),`展示所有手牌${selfDraw ? '' : ',然后你摸一张牌'}`)
|
||||
.set('choice', selfDraw)
|
||||
.set('ai',()=>get.event().choice)
|
||||
.forResult();
|
||||
event.result.cost_data = {selfDraw};
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
if(targets&&targets.length){
|
||||
player.line(targets,'green');
|
||||
targets.sortBySeat();
|
||||
},
|
||||
async content(event, trigger, player){
|
||||
await player.showHandcards(get.translation(player)+'发动了【秉壹】')
|
||||
const data = event.cost_data;
|
||||
if (data.asyncDraw && data.targets && data.targets.length){
|
||||
const targets = data.targets.sortBySeat();
|
||||
game.asyncDraw(targets);
|
||||
}
|
||||
else event.finish();
|
||||
if(event.draw){
|
||||
if (data.selfDraw) {
|
||||
player.draw();
|
||||
event.finish();
|
||||
}
|
||||
"step 3"
|
||||
game.delayx();
|
||||
},
|
||||
},
|
||||
//钟会
|
||||
|
@ -9321,6 +9325,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
rejiushi:{
|
||||
audio:2,
|
||||
audioname:['mb_caomao'],
|
||||
group:['rejiushi1','rejiushi2','rejiushi3','rejiushi_gain'],
|
||||
subfrequent:['gain'],
|
||||
subSkill:{
|
||||
|
@ -9347,6 +9352,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return false;
|
||||
},
|
||||
audio:'rejiushi',
|
||||
audioname:['mb_caomao'],
|
||||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
if(player.classList.contains('turnedover')) return false;
|
||||
|
@ -11709,16 +11715,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function (event){
|
||||
return (event.num>0)
|
||||
},
|
||||
getIndex(event, player, triggername){
|
||||
return event.num;
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
event.count=trigger.num;
|
||||
'step 1'
|
||||
player.draw(2);
|
||||
event.count--;
|
||||
if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true});
|
||||
event.given_map={};
|
||||
event.num=2;
|
||||
'step 2'
|
||||
'step 1'
|
||||
player.chooseCardTarget({
|
||||
filterCard:function(card){
|
||||
return get.itemtype(card)=='card'&&!card.hasGaintag('reyiji_tag');
|
||||
|
@ -11737,22 +11743,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.value(card,target)*get.attitude(player,target);
|
||||
},
|
||||
});
|
||||
'step 3'
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
var res=result.cards,target=result.targets[0].playerid;
|
||||
player.addGaintag(res,'reyiji_tag');
|
||||
event.num-=res.length
|
||||
if(!event.given_map[target]) event.given_map[target]=[];
|
||||
event.given_map[target].addArray(res);
|
||||
if(event.num>0) event.goto(2);
|
||||
if(event.num>0) event.goto(1);
|
||||
}
|
||||
else if(event.num==2){
|
||||
if(_status.connectMode){
|
||||
game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});
|
||||
}
|
||||
event.goto(5);
|
||||
event.finish();
|
||||
}
|
||||
'step 4'
|
||||
'step 3'
|
||||
if(_status.connectMode){
|
||||
game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});
|
||||
}
|
||||
|
@ -11771,16 +11777,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
giver:player,
|
||||
animate:'giveAuto',
|
||||
}).setContent('gaincardMultiple');
|
||||
'step 5'
|
||||
if(event.count>0&&player.hasSkill('new_reyiji')){
|
||||
player.chooseBool(get.prompt2('new_reyiji'));
|
||||
}
|
||||
else event.finish();
|
||||
'step 6'
|
||||
if(result.bool){
|
||||
player.logSkill('new_reyiji');
|
||||
event.goto(1);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
maixie:true,
|
||||
|
@ -13578,42 +13574,43 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
rejianxiong_old:{
|
||||
audio:2,
|
||||
audio:'rejianxiong',
|
||||
audioname2:{
|
||||
gz_caocao:'jianxiong',
|
||||
},
|
||||
trigger:{player:'damageEnd'},
|
||||
direct:true,
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0],true)=='o'){
|
||||
player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel2').set('prompt',get.prompt('rejianxiong')).ai=function(){
|
||||
var trigger=_status.event.getTrigger();
|
||||
if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0;
|
||||
return 1;
|
||||
};
|
||||
}
|
||||
else{
|
||||
player.chooseControl('rejianxiong_mopai','cancel2').set('prompt',get.prompt('rejianxiong'));
|
||||
}
|
||||
"step 1"
|
||||
if(result.control=='rejianxiong_napai'){
|
||||
player.logSkill('rejianxiong');
|
||||
player.gain(trigger.cards);
|
||||
player.$gain2(trigger.cards);
|
||||
}
|
||||
else if(result.control=='rejianxiong_mopai'){
|
||||
player.logSkill('rejianxiong');
|
||||
player.draw();
|
||||
async cost(event,trigger,player){
|
||||
let list=['摸牌'];
|
||||
if(get.itemtype(trigger.cards)=='cards'&&trigger.cards.filterInD().length){
|
||||
list.push('拿牌');
|
||||
}
|
||||
list.push('cancel2');
|
||||
const {result:{control}}=await player.chooseControl(list).set('prompt',get.prompt2('rejianxiong_old')).set('ai',()=>{
|
||||
const player=get.event('player'),trigger=get.event().getTrigger();
|
||||
const cards=trigger.cards.filterInD();
|
||||
if(get.event().controls.includes('拿牌')){
|
||||
if(cards.reduce((sum,card)=>{
|
||||
return sum+(card.name=='du'?-1:1);
|
||||
},0)>1||player.getUseValue(cards[0])>6) return '拿牌';
|
||||
}
|
||||
return '摸牌';
|
||||
});
|
||||
event.result={bool:(control!='cancel2'),cost_data:control};
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
if(event.cost_data=='摸牌') await player.draw();
|
||||
else await player.gain(trigger.cards.filterInD(),'gain2');
|
||||
},
|
||||
ai:{
|
||||
maixie:true,
|
||||
maixie_hp:true,
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
target(card,player,target){
|
||||
if(player.hasSkillTag('jueqing',false,target)) return [1,-1];
|
||||
if(get.tag(card,'damage')&&player!=target) return [1,0.6];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
reyiji:{
|
||||
audio:2,
|
||||
|
@ -15462,7 +15459,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcmieji:'灭计',
|
||||
dcmieji_info:'出牌阶段限一次,你可以展示一张武器牌或黑色锦囊牌。你将此牌置于牌堆顶,然后令一名有手牌的其他角色选择一项:⒈弃置一张锦囊牌;⒉依次弃置两张非锦囊牌。',
|
||||
dcfencheng:'焚城',
|
||||
dcfencheng_info:'限定技。出牌阶段,你可以指定一名其他角色,令从其开始的其他角色依次选择一项:⒈弃置至少X张牌(X为上一名角色弃置的牌数+1)。⒉你对其造成2点伤害。',
|
||||
dcfencheng_info:'限定技。出牌阶段,你可以指定一名其他角色,令从其开始的其他角色依次选择一项:⒈弃置至少X张牌(X为上一名角色弃置的牌数+1)。⒉你对其造成2点火焰伤害。',
|
||||
oljiang:'激昂',
|
||||
oljiang_info:'①当你使用【决斗】或红色【杀】指定第一个目标后,或成为【决斗】或红色【杀】的目标后,你可以摸一张牌。②当有【决斗】或红色【杀】于每回合内首次因弃置而进入弃牌堆后,你可以失去1点体力并获得这些牌。',
|
||||
re_xunyou:'界荀攸',
|
||||
|
@ -15587,6 +15584,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
re_lidian_prefix:'界',
|
||||
re_xushu:'界徐庶',
|
||||
re_xushu_prefix:'界',
|
||||
rejianxiong_old:'奸雄',
|
||||
rejianxiong_old_info:'当你受到伤害后,你可以摸一张牌或获得对你造成伤害的牌。',
|
||||
|
||||
refresh_standard:'界限突破·标',
|
||||
refresh_feng:'界限突破·风',
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue