commit
7ea889384d
|
@ -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.
|
@ -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:{
|
||||
|
@ -1855,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:'玉玺',
|
||||
|
|
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -1536,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;
|
||||
|
@ -1555,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;
|
||||
|
@ -2494,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){
|
||||
|
@ -2908,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(){
|
||||
|
@ -2940,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;
|
||||
},
|
||||
|
@ -2982,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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -20,21 +20,181 @@ 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:太原王氏']],
|
||||
},
|
||||
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_zhong:['clan_zhongyan','clan_zhonghui','clan_zhongyu'],
|
||||
},
|
||||
},
|
||||
/** @type { importCharacterConfig['skill'] } */
|
||||
skill:{
|
||||
//族贝斯塔[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,
|
||||
|
@ -447,17 +607,15 @@ 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.chooseToDiscard('迂志:请弃置一张手牌','摸此牌牌名字数的牌。下一轮开始时,若本轮你使用的牌数或上一轮你以此法摸的牌数小于此牌牌名字数,则你失去1点体力。',true,function(card,player){
|
||||
var num=get.cardNameLength(card);
|
||||
return typeof num=='number'&&num>0;
|
||||
}).set('ai',function(card){
|
||||
}).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);
|
||||
'step 4'
|
||||
if(result.bool){
|
||||
player.logSkill('clanyuzhi');
|
||||
player.showCards(result.cards,get.translation(player)+'发动了【迂志】');
|
||||
player.draw(get.cardNameLength(result.cards[0]));
|
||||
player.storage.clanyuzhi=get.cardNameLength(result.cards[0]);
|
||||
player.markSkill('clanyuzhi');
|
||||
|
@ -474,7 +632,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 +645,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 +654,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 +1240,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 +1396,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'],
|
||||
trigger:{player:'useCard'},
|
||||
forced:true,
|
||||
clanSkill:true,
|
||||
|
@ -2315,6 +2480,10 @@ 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){
|
||||
|
@ -2333,13 +2502,50 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
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','clandianzhan_clear'],
|
||||
subSkill:{
|
||||
count:{
|
||||
trigger:{player:'useCardAfter'},
|
||||
filter(event,player){
|
||||
let suit=get.suit(event.card);
|
||||
return lib.suits.includes(suit)&&!player.getStorage('clandianzhan').includes(suit);
|
||||
},
|
||||
silent:true,
|
||||
charlotte:true,
|
||||
content(){
|
||||
player.storage.clandianzhan=[];
|
||||
for(let i=player.actionHistory.length-1; i>=0; i--){
|
||||
let history=player.actionHistory[i].useCard;
|
||||
for(let evt of history){
|
||||
player.storage.clandianzhan.add(get.suit(evt.card));
|
||||
}
|
||||
if(player.actionHistory[i].isRound) break;
|
||||
}
|
||||
player.markSkill('clandianzhan');
|
||||
},
|
||||
sub:true
|
||||
},
|
||||
clear:{
|
||||
trigger:{global:'roundStart'},
|
||||
silent:true,
|
||||
charlotte:true,
|
||||
content(){
|
||||
player.unmarkSkill('clandianzhan');
|
||||
},
|
||||
sub:true
|
||||
}
|
||||
}
|
||||
},
|
||||
clanhuanyin:{
|
||||
|
@ -2622,6 +2828,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
zhongyu:'钟毓(?-263年),字稚叔,颍川长社(今河南长葛市)人。三国时期魏国大臣,太傅钟繇之子、司徒钟会之兄。出身颍川钟氏,机灵敏捷,有其父之遗风。十四岁时,起家散骑侍郎。太和初年,迁黄门侍郎,袭封定陵县侯。正始年间,拜散骑常侍,迁魏郡太守,入为侍中、御史中丞、廷尉 [5] 。随平诸葛诞的淮南叛乱,拜青州刺史、后将军,都督徐州、荆州诸军事。景元四年(263年),去世,追赠车骑将军,谥号为惠,著有文集五卷(见《隋书·经籍志》及《两唐书·经籍志》),传于世。',
|
||||
wanglun:'王沦(233年-257年)字太冲,出身太原晋阳王姓世族(今山西省太原市),王昶三子,王浑、王深之弟,王湛之兄。醇粹简远,崇尚老庄之学,心思平淡。二十多时被举荐为孝廉,没有前往,后任大将军参军。257年,诸葛诞不满司马氏篡权而在寿春起义,王沦跟随司马昭征讨,遭遇疾疫去世,时年二十五,时人惜之,司马昭为他流泪。其兄著诔文《表德论》,表述其德行,说“因为畏惧帝王的典章制度,不能写墓志铭,于是撰写过往的事迹,刻在墓的背面。”',
|
||||
wuqiao:'吴乔,西晋人物,蜀车骑将军吴懿之孙。李雄建立成汉政权,他沦落益州,长达三十年,始终不向李雄屈服。',
|
||||
clan_wangguang:'王广,三国时期曹魏太原祁县人,哲学家。东汉司徒王允从孙,魏太尉王凌之子。有志尚学,官至尚书。魏时随父亲在朝作官,屯骑校尉,机智有谋。当得知司马懿篡夺曹魏政权时,王凌与外甥令狐愚合谋立楚王为魏主,王广劝其父不可,王凌没有接受儿子的谏言,结果计谋泄而被害。',
|
||||
},
|
||||
dynamicTranslate:{
|
||||
clanlianzhu(player){
|
||||
|
@ -2679,7 +2886,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:'族荀谌',
|
||||
|
@ -2733,9 +2940,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
clanchenya_info:'当一名角色发动“出牌阶段限一次”的技能后,你可以令其重铸任意张牌名字数为X的牌(X为其手牌数)。',
|
||||
clan_zhonghui:'族钟会',
|
||||
clanyuzhi:'迂志',
|
||||
clanyuzhi_info:'锁定技。新的一轮开始时,你依次执行以下项:①若你上一轮使用的牌数或你上上轮因〖迂志〗摸的牌数小于你上轮因〖迂志〗摸的牌数,你失去1点体力或失去〖保族〗。②你展示一张手牌,然后摸X张牌(X为此牌牌名字数)。',
|
||||
clanyuzhi_info:'锁定技。新的一轮开始时,你依次执行以下项:①若你上一轮使用的牌数或你上上轮因〖迂志〗摸的牌数小于你上轮因〖迂志〗摸的牌数,你失去1点体力或失去〖保族〗。②你弃置一张手牌,然后摸X张牌(X为此牌牌名字数)。',
|
||||
clanxieshu:'挟术',
|
||||
clanxieshu_info:'当你使用牌造成伤害后,或受到来自牌造成的伤害后,你可以弃置Y张牌并摸你已损失体力值张牌(Y为此牌牌名字数)。',
|
||||
clanxieshu_info:'当你每回合首次因牌造成或受到伤害后,你可以横置武将牌,然后弃置Y张牌并摸你已损失体力值张牌(Y为此牌牌名字数)。',
|
||||
clan_zhongyu:'族钟毓',
|
||||
clanjiejian:'捷谏',
|
||||
clanjiejian_info:'当你于一回合使用第X张牌指定第一个目标后,若此牌不为装备牌,则你可以令一名目标角色摸X张牌。(X为此牌牌名字数)',
|
||||
|
@ -2752,6 +2959,12 @@ 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_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:{
|
||||
|
|
|
@ -3420,7 +3420,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.itemtype(player.storage.mia_qianmeng)=='card';
|
||||
},
|
||||
async cost(event, trigger, player){
|
||||
event.result = await
|
||||
event.result = await
|
||||
player.chooseTarget(get.prompt('mia_qianmeng'),'令一名角色获得牌堆中所有点数为'+player.storage.mia_qianmeng.number+'的牌',lib.filter.notMe).forResult();
|
||||
},
|
||||
async content(event, trigger, player){
|
||||
|
@ -6689,7 +6689,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var next=get.copy(lib.skill.kud_qiaoshou_backupx);
|
||||
next.cardname=links[0][2];
|
||||
return next;
|
||||
},
|
||||
},
|
||||
prompt(links){
|
||||
return '将一张手牌置于武将牌上,然后视为装备'+get.translation(links[0][2]);
|
||||
},
|
||||
|
@ -9357,7 +9357,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if (result.bool) event.result = {
|
||||
bool: true,
|
||||
cards: result.links,
|
||||
}
|
||||
}
|
||||
},
|
||||
logTarget: 'player',
|
||||
async content(event, trigger, player){
|
||||
|
@ -17676,22 +17676,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{player:'useCard'},
|
||||
forced:true,
|
||||
filter(event,player){
|
||||
return event.card.name=='sha'||get.type(event.card,null,false)=='trick';
|
||||
return event.card.name=='sha' || get.type(event.card,null,false)=='trick';
|
||||
},
|
||||
content(){
|
||||
'step 0'
|
||||
var filter1=function(card){
|
||||
return get.name(card)=='sha';
|
||||
},filter2=function(card){
|
||||
return get.type(card)=='trick';
|
||||
};
|
||||
var num1=player.countCards('h',filter1),num2=player.countCards('h',filter2);
|
||||
if(num1!=num2){
|
||||
var delta=num1-num2;
|
||||
player.chooseToDiscard('h',true,Math.abs(delta),delta>0?filter1:filter2,'驭衡:请弃置'+get.cnNumber(Math.abs(delta))+'张'+(delta>0?'【杀】':'普通锦囊牌'));
|
||||
async content(event, trigger, player){
|
||||
const cards1 = player.getCards('h', card => get.name(card) === 'sha'), cards2 = player.getCards('h', card => get.type(card) === 'trick');
|
||||
if (cards1.length !== cards2.length){
|
||||
const num = cards1.length - cards2.length, cards = num > 0 ? cards1 : cards2;
|
||||
let i = 0;
|
||||
cards.forEach(card => {
|
||||
if (i < Math.abs(num) && lib.filter.cardDiscardable(card, player, 'junkquandao')) i++;
|
||||
});
|
||||
if (i > 0) {
|
||||
await player.chooseToDiscard(i, true,
|
||||
`权道:请弃置${ get.cnNumber(i) }张${ num > 0 ? '杀' : '普通锦囊牌' }`,
|
||||
num > 0 ? (card => get.name(card) === 'sha') : (card => get.type(card) === 'trick'))
|
||||
}
|
||||
}
|
||||
'step 1'
|
||||
player.draw();
|
||||
await player.draw();
|
||||
},
|
||||
},
|
||||
junkchigang:{
|
||||
|
@ -17765,7 +17766,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.chooseButton(2,[
|
||||
'蛮智:请选择让下列等式成立的A与B的值',
|
||||
'<div class="text center">目标等式</div>',
|
||||
`0.5 × A² + 2.5 × B - ${game.roundNumber} = ${game.countPlayer()}`,
|
||||
`0.5 × A<sup>2</sup> + 2.5 × B - ${game.roundNumber} = ${game.countPlayer()}`,
|
||||
'<div class="text center">A的可选值</div>',
|
||||
[nums.map(i=>{
|
||||
return [
|
||||
|
@ -17803,7 +17804,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(i[0]=='A') a=parseInt(i.slice(2));
|
||||
else b=parseInt(i.slice(2));
|
||||
}
|
||||
equals=`0.5×${a}²+2.5×${b}-${game.roundNumber}=${game.countPlayer()}`;
|
||||
equals=`0.5×${a}<sup>2</sup>+2.5×${b}-${game.roundNumber}=${game.countPlayer()}`;
|
||||
player.logSkill('nsmanzhi');
|
||||
player.chat(equals);
|
||||
game.log(player,'的计算结果为',equals);
|
||||
|
@ -18847,7 +18848,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
junkshengzhi:'圣质',
|
||||
junkshengzhi_info:'锁定技。当你发动非锁定技后,你令你本回合使用的下一张牌无距离和次数限制。',
|
||||
junkquandao:'权道',
|
||||
junkquandao_info:'锁定技。当你使用【杀】或普通锦囊牌时,若你手牌中的【杀】或普通锦囊牌的数量之差X不为0,则你弃置X张数量较多的一种牌,然后你摸一张牌。',
|
||||
junkquandao_info:'锁定技。当你使用【杀】或普通锦囊牌时,{若你手牌中的【杀】或普通锦囊牌的数量之差X不为0,则你弃置X张数量较多的一种牌},然后你摸一张牌。',
|
||||
junkchigang:'持纲',
|
||||
junkchigang_info:'转换技,锁定技。判定阶段开始前,你取消此阶段。然后你获得一个额外的:阴,摸牌阶段;阳,出牌阶段。',
|
||||
junkrende:'仁德',
|
||||
|
@ -18889,7 +18890,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ns_mengyou_prefix:'数学',
|
||||
ns_mengyou_ab:'孟优',
|
||||
nsmanzhi:'蛮智',
|
||||
nsmanzhi_info:'准备阶段或结束阶段开始时,你可以将场上出现的数字代入等式中的A和B。若此等式成立,你摸Y张牌。(等式为Y=0.5A²+2.5B-X,其中X为游戏轮数,Y为存活人数)',
|
||||
nsmanzhi_info:'准备阶段或结束阶段开始时,你可以将场上出现的数字代入等式中的A和B。若此等式成立,你摸Y张牌。(等式为Y=0.5A<sup>2</sup>+2.5B-X,其中X为游戏轮数,Y为存活人数)',
|
||||
ns_chengpu:'铁索程普',
|
||||
ns_chengpu_prefix:'铁索',
|
||||
ns_chengpu_ab:'程普',
|
||||
|
|
|
@ -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'){
|
||||
|
|
|
@ -2859,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');
|
||||
|
@ -4474,7 +4474,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
return Math.random();
|
||||
});
|
||||
}).set('complexTarget', true);
|
||||
}
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
|
@ -5337,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'
|
||||
|
@ -5348,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'
|
||||
|
@ -7096,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);
|
||||
|
@ -7136,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:{
|
||||
|
@ -9947,11 +9946,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
intro:{content:'不能使用手牌'},
|
||||
charlotte:true,
|
||||
mod:{
|
||||
cardEnabled: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){
|
||||
if(get.position(card)=='h') 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;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -11901,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'
|
||||
|
@ -12413,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年,在关羽欲返刘备旗下,在突破曹操的五道关卡后路过其落草之地,与周仓一同向关羽要求能以期成为关羽家臣。但此时仅周仓同行,其他弟兄则于山中等待。不久后,因其欲夺偶然路过的赵云之马,反遭讨伐战败身死。',
|
||||
|
@ -12537,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:'失守',
|
||||
|
@ -12551,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:'周善',
|
||||
|
@ -12716,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:'锁定技。准备阶段,你横置你的武将牌。然后你可横置任意名体力值等于你的角色。',
|
||||
|
@ -12751,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:'尹夫人',
|
||||
|
@ -12828,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。',
|
||||
|
|
|
@ -459,7 +459,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
delete player.storage.mbxuetu_used;
|
||||
});
|
||||
}
|
||||
player.markAuto('mbxuetu_used', storage);
|
||||
player.markAuto('mbxuetu_used',[status===0?storage:(!event.cards.length)]);
|
||||
if (status === 0 && !storage || status === 1 && event.cards.length) {
|
||||
await target.recover();
|
||||
}
|
||||
|
@ -718,7 +718,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(gains.length) player.gain(gains.randomGets(Math.min(gains.length,num)),'gain2');
|
||||
},
|
||||
getNum:function(player,event){
|
||||
let num=3;
|
||||
let num=(get.mode()=='identity'?3:4);
|
||||
const history=game.getAllGlobalHistory('everything');
|
||||
for(let i=history.length-1;i>=0;i--){
|
||||
const evt=history[i];
|
||||
|
@ -743,8 +743,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(event,player,name){
|
||||
if(name=='damageSource'&&player.getHistory('sourceDamage').indexOf(event)!=0) return false;
|
||||
return game.hasPlayer(target=>{
|
||||
if(name=='damageEnd') return get.distance(player,target)>2;
|
||||
return get.distance(player,target)<=2;
|
||||
if(get.mode()!='doudizhu'){
|
||||
if(name=='damageEnd'&&get.distance(player,target)<=2) return false;
|
||||
if(name=='damageSource'&&get.distance(player,target)>2) return false;
|
||||
}
|
||||
const zhoufa=player.storage.zhoulin_zhoufa;
|
||||
if(!zhoufa) return true;
|
||||
if(zhoufa=='豹'||zhoufa=='兔') return true;
|
||||
if(zhoufa=='鹰') return target.countCards('he');
|
||||
return target.countDiscardableCards(player,'e');
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
|
@ -756,10 +763,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'你随机弃置其装备区的一张牌',
|
||||
'令其摸一张牌',
|
||||
][['豹','鹰','熊','兔'].indexOf(zhoufa)]:'令其随机执行一个效果';
|
||||
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('shoufa'),'选择一名距离'+(event.triggername=='damageEnd'?'':'不')+'大于2的角色,'+str,(card,player,target)=>{
|
||||
const nodoudizhu=(get.mode()=='doudizhu'?'':('距离'+(event.triggername=='damageEnd'?'':'不')+'大于2的'));
|
||||
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('shoufa'),'选择一名'+nodoudizhu+'角色,'+str,(card,player,target)=>{
|
||||
const name=_status.event.triggername;
|
||||
if(name=='damageEnd'&&get.distance(player,target)<=2) return false;
|
||||
if(name=='damageSource'&&get.distance(player,target)>2) return false;
|
||||
if(get.mode()!='doudizhu'){
|
||||
if(name=='damageEnd'&&get.distance(player,target)<=2) return false;
|
||||
if(name=='damageSource'&&get.distance(player,target)>2) return false;
|
||||
}
|
||||
const zhoufa=player.storage.zhoulin_zhoufa;
|
||||
if(!zhoufa) return true;
|
||||
if(zhoufa=='豹'||zhoufa=='兔') return true;
|
||||
|
@ -3819,7 +3829,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
order:1,
|
||||
threaten:1.14,
|
||||
unequip:true,
|
||||
unequip_ai:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(arg&&arg.name=='sha'&&arg.card&&arg.card.storage&&arg.card.storage.mbguli) return true;
|
||||
|
@ -3846,8 +3855,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.loseHp();
|
||||
'step 1'
|
||||
player.drawTo(player.maxHp);
|
||||
}
|
||||
}
|
||||
},
|
||||
group:'mbguli_unequip',
|
||||
},
|
||||
unequip:{
|
||||
trigger:{
|
||||
player:'useCardToPlayered',
|
||||
},
|
||||
filter:function({card}){
|
||||
return card.name=='sha' && card.storage && card.storage.mbguli;
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
logTarget:'target',
|
||||
content:function(){
|
||||
trigger.target.addTempSkill('qinggang2');
|
||||
trigger.target.storage.qinggang2.add(trigger.card);
|
||||
trigger.target.markSkill('qinggang2');
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
mbaosi:{
|
||||
|
@ -7218,11 +7244,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
delay:false,
|
||||
check:function(card){
|
||||
var player=_status.event.player;
|
||||
if(!player.storage.jueyong||player.storage.jueyong[0].length<Math.max(1,player.getDamagedHp())||!player.storage.jueyong[0].filter(function(card){
|
||||
return get.effect(player,card,player.storage.jueyong[1][player.storage.jueyong[0].indexOf(card)],player)<0;
|
||||
}).length||(player.hp<=1&&!player.storage.jueyong[0].filter(function(card){
|
||||
if(!player.storage.jueyong||!player.storage.jueyong[0].length||player.hp<=1&&!player.storage.jueyong[0].some(function(card){
|
||||
return get.tag(card,'damage')>0;
|
||||
}).length)) return -1;
|
||||
})||!player.storage.jueyong[0].some(function(card){
|
||||
return get.effect(player,card,player.storage.jueyong[1][player.storage.jueyong[0].indexOf(card)],player)<0;
|
||||
})) return -1;
|
||||
return 20-get.value(card);
|
||||
},
|
||||
content:function(){
|
||||
|
@ -15848,8 +15874,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
shoufa:function(player){
|
||||
const zhoufa=player.storage.zhoulin_zhoufa;
|
||||
if(!zhoufa) return '当你受到伤害后/于一回合首次造成伤害后,你可以选择一名与你距离大于/不大于2的角色,令其随机执行以下一项:豹,令其受到1点无来源伤害;鹰,你随机获得其一张牌;熊,你随机弃置其装备区的一张牌;兔,令其摸一张牌。';
|
||||
let str='当你受到伤害后/于一回合首次造成伤害后,你可以选择一名与你距离大于/不大于2的角色,';
|
||||
const nodoudizhu=(get.mode()=='doudizhu'?'':'与你距离大于/不大于2的');
|
||||
if(!zhoufa) return '当你受到伤害后/于一回合首次造成伤害后,你可以选择一名'+nodoudizhu+'角色,令其随机执行以下一项:豹,令其受到1点无来源伤害;鹰,你随机获得其一张牌;熊,你随机弃置其装备区的一张牌;兔,令其摸一张牌。';
|
||||
let str='当你受到伤害后/于一回合首次造成伤害后,你可以选择一名'+nodoudizhu+'角色,';
|
||||
str+=[
|
||||
'令其受到1点无来源伤害',
|
||||
'你随机获得其一张牌',
|
||||
|
@ -16742,6 +16769,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
muludawang:'木鹿大王',
|
||||
shoufa:'兽法',
|
||||
shoufa_info:'当你受到伤害后/于一回合首次造成伤害后,你可以选择一名与你距离大于/不大于2的角色,令其随机执行以下一项:豹,令其受到1点无来源伤害;鹰,你随机获得其一张牌;熊,你随机弃置其装备区的一张牌;兔,令其摸一张牌。',
|
||||
shoufa_info_doudizhu:'当你受到伤害后/于一回合首次造成伤害后,你可以选择一名角色,令其随机执行以下一项:豹,令其受到1点无来源伤害;鹰,你随机获得其一张牌;熊,你随机弃置其装备区的一张牌;兔,令其摸一张牌。',
|
||||
yuxiang:'御象',
|
||||
yuxiang_info:'锁定技,若你有护甲值,则:①你计算与其他角色的距离-1,其他角色计算与你的距离+1;②当你受到火焰伤害时,此伤害+1。',
|
||||
zhoulin:'咒鳞',
|
||||
|
@ -16751,7 +16779,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sidai:'伺怠',
|
||||
sidai_info:'限定技,出牌阶段,你可以将手牌区内的所有基本牌当做【杀】使用。若此牌对应的实体牌中:包含【闪】,则目标角色成为此牌的目标后,需弃置一张基本牌,否则不可响应此牌;包含【桃】,则当目标角色受到此牌的伤害后,其减1点体力上限。',
|
||||
jieyu:'竭御',
|
||||
jieyu_info:'结束阶段,你可以从弃牌堆中获得共X张不同牌名的基本牌(X为3-你上次发动〖竭御〗至今你成为其他角色使用伤害类卡牌目标的次数,且X至少为1)。',
|
||||
jieyu_info:'结束阶段,你可以从弃牌堆中获得共X张不同牌名的基本牌(X为4-你上次发动〖竭御〗至今你成为其他角色使用伤害类卡牌目标的次数,且X至少为1)。',
|
||||
jieyu_info_identity:'结束阶段,你可以从弃牌堆中获得共X张不同牌名的基本牌(X为3-你上次发动〖竭御〗至今你成为其他角色使用伤害类卡牌目标的次数,且X至少为1)。',
|
||||
yangfeng:'杨奉',
|
||||
mbxuetu:'血途',
|
||||
mbxuetu_info:'转换技。出牌阶段限一次,阴:你可以弃置一张牌,然后令一名角色回复1点体力;阳:你可以失去1点体力,然后令一名角色摸两张牌。',
|
||||
|
|
|
@ -14,11 +14,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
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,['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,6 +52,101 @@ 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');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
//程普
|
||||
dclihuo:{
|
||||
audio:'relihuo',
|
||||
|
@ -721,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]--;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -907,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');
|
||||
}
|
||||
|
@ -1267,7 +1366,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:'威临',
|
||||
|
@ -1305,6 +1404,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
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',
|
||||
|
|
|
@ -137,6 +137,7 @@ window.noname_character_rank={
|
|||
'xia_yuzhenzi',
|
||||
'dc_simashi',
|
||||
'dc_sb_simayi',
|
||||
'caofang',
|
||||
],
|
||||
a:[
|
||||
'star_caoren',
|
||||
|
@ -684,6 +685,8 @@ window.noname_character_rank={
|
|||
'ol_sb_guanyu',
|
||||
'gongsunxiu',
|
||||
'dc_caoshuang',
|
||||
'clan_wangling',
|
||||
'clan_wangguang',
|
||||
],
|
||||
bp:[
|
||||
'xin_huojun',
|
||||
|
@ -1076,6 +1079,8 @@ window.noname_character_rank={
|
|||
'yangfeng',
|
||||
'sb_xiahoudun',
|
||||
'sb_gaoshun',
|
||||
're_wangyi',
|
||||
'ol_wangyi',
|
||||
],
|
||||
b:[
|
||||
'junk_guanyu',
|
||||
|
@ -2175,8 +2180,11 @@ window.noname_character_rank={
|
|||
'xia_shitao',
|
||||
'bailingyun',
|
||||
'dc_sb_simayi',
|
||||
'caofang',
|
||||
],
|
||||
rare:[
|
||||
're_wangyi',
|
||||
'ol_wangyi',
|
||||
'tw_yanliang',
|
||||
'tw_wenchou',
|
||||
'tw_yuantan',
|
||||
|
@ -2653,6 +2661,7 @@ window.noname_character_rank={
|
|||
'furongfuqian',
|
||||
'zhenghun',
|
||||
'clan_wangling',
|
||||
'clan_wangguang',
|
||||
'clan_wangyun',
|
||||
'quhuang',
|
||||
'ol_wenqin',
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
},
|
||||
//钟会
|
||||
|
@ -11744,7 +11748,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
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){
|
||||
|
@ -13568,42 +13572,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,
|
||||
|
@ -15452,7 +15457,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:'界荀攸',
|
||||
|
@ -15577,6 +15582,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:'界限突破·风',
|
||||
|
|
417
character/sb.js
417
character/sb.js
|
@ -55,7 +55,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sb_tong:['liucheng','sp_yangwan','sb_xiahoushi','sb_zhangfei','sb_zhaoyun','sb_sunce','sb_zhurong','sb_xiaoqiao','sb_xiahoudun'],
|
||||
sb_yu:['sb_yujin','sb_lvmeng','sb_huangzhong','sb_huanggai','sb_zhouyu','sb_caoren','sb_ganning','sb_yl_luzhi','sb_huangyueying'],
|
||||
sb_neng:['sb_huaxiong','sb_sunshangxiang','sb_jiangwei','sb_yuanshao','sb_menghuo','sb_guanyu','sb_gaoshun'],
|
||||
sb_waitforsort:[],
|
||||
// sb_waitforsort:[],
|
||||
}
|
||||
},
|
||||
characterSubstitute:{
|
||||
|
@ -742,11 +742,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sbxingshang:{
|
||||
audio:2,
|
||||
trigger:{global:['die','damageEnd']},
|
||||
usable:1,
|
||||
filter(event,player){
|
||||
if(player.countMark('sbxingshang')>=get.info('sbxingshang').getLimit) return false;
|
||||
return event.name=='die'||!player.getHistory('custom',evt=>evt.sbxingshang).length;
|
||||
},
|
||||
forced:true,
|
||||
locked:false,
|
||||
async content(event,trigger,player){
|
||||
player.addMark('sbxingshang',1);
|
||||
player.addMark('sbxingshang',Math.min(2,get.info('sbxingshang').getLimit-player.countMark('sbxingshang')));
|
||||
if(trigger.name=='damage') player.getHistory('custom').push({sbxingshang:true});
|
||||
},
|
||||
marktext:'颂',
|
||||
intro:{
|
||||
|
@ -754,37 +758,89 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:'mark',
|
||||
},
|
||||
ai:{threaten:2.5},
|
||||
getLimit:9,
|
||||
getNum(num){
|
||||
if(typeof num!='number'||!Array.from({length:9}).map((_,i)=>i+1).includes(num)) return 0;
|
||||
return [2,2,5,5,1,2,2,3,3][num-1];
|
||||
},
|
||||
getEffect(player,num){
|
||||
if(!player||typeof num!='number') return 0;
|
||||
switch(num){
|
||||
//行殇选项
|
||||
case 1://-2,重置武将牌
|
||||
if(game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)>0&&target.isTurnedOver();
|
||||
})) return 10;
|
||||
return 0;
|
||||
case 2://-2,摸min(5,max(1,阵亡角色数))的牌
|
||||
return Math.min(5,(Math.max(1,game.dead.length)));
|
||||
case 3://-5,加上限加血+复原装备栏
|
||||
if(!game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)>0&&target.maxHp<10;
|
||||
})) return 0;
|
||||
return 5+(game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)>0&&target.hasDisabledSlot();
|
||||
})?1:0);
|
||||
case 4://-5,劝封/化萍
|
||||
return 0;
|
||||
//放逐选项
|
||||
case 5://-1,封印基本牌外的手牌
|
||||
if(game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)<0;
|
||||
})) return 1;
|
||||
return 0;
|
||||
case 6://-2,白板到结束
|
||||
if(game.hasPlayer(target=>{
|
||||
if(target.hasSkill('sbfangzhu_ban')||target.hasSkill('fengyin')||target.hasSkill('baiban')) return false;
|
||||
return get.attitude(player,target)<0&&['name','name1','name2'].reduce((sum,name)=>{
|
||||
if(target[name]&&(name!='name1'||target.name!=target.name1)){
|
||||
if(get.character(target[name])) sum+get.rank(target[name],true);
|
||||
}
|
||||
return sum;
|
||||
},0)>5;
|
||||
})) return 6;
|
||||
return 0;
|
||||
case 7://-2,强命到结束
|
||||
return 0;
|
||||
case 8://-3,翻面
|
||||
if(game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)<0&&!target.isTurnedOver();
|
||||
})) return 8;
|
||||
return 0;
|
||||
case 9://-3,封印装备牌外的手牌
|
||||
if(game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)<0;
|
||||
})) return 2.5;
|
||||
return 0;
|
||||
default://其他
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
group:'sbxingshang_use',
|
||||
subSkill:{
|
||||
use:{
|
||||
audio:'sbxingshang',
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
filter(event,player){
|
||||
return game.hasPlayer(target=>{
|
||||
if(player.countMark('sbxingshang')>1) return true;
|
||||
return player.countMark('sbxingshang')&&(target.isLinked()||target.isTurnedOver());
|
||||
});
|
||||
},
|
||||
usable:1,
|
||||
usable:2,
|
||||
chooseButton:{
|
||||
dialog:function(){
|
||||
var dialog=ui.create.dialog(
|
||||
'行殇:请选择你要执行的一项',
|
||||
[[
|
||||
[1,' ⒈复原一名角色的武将牌 '],
|
||||
[2,' ⒉令一名角色摸'+Math.min(5,Math.max(1,game.dead.length))+'张牌 '],
|
||||
],'tdnodes'],
|
||||
[[
|
||||
[3,' ⒊令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏 '],
|
||||
],'tdnodes'],
|
||||
[[
|
||||
[4,' ⒋获得一名已阵亡角色的所有技能,然后失去武将牌上的所有技能 '],
|
||||
],'tdnodes']
|
||||
);
|
||||
dialog(){
|
||||
var dialog=ui.create.dialog('行殇:请选择你要执行的一项','hidden');
|
||||
dialog.add([[
|
||||
[1,'移去2个“颂”标记,复原一名角色的武将牌'],
|
||||
[2,'移去2个“颂”标记,令一名角色摸'+get.cnNumber(Math.min(5,Math.max(1,game.dead.length)))+'张牌'],
|
||||
[3,'移去5个“颂”标记,令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏'],
|
||||
[4,'移去5个“颂”标记,获得一名已阵亡角色的所有技能,然后失去〖行殇〗〖放逐〗〖颂威〗'],
|
||||
],'textbutton']);
|
||||
return dialog;
|
||||
},
|
||||
filter:function(button,player){
|
||||
if(button.link>player.countMark('sbxingshang')) return false;
|
||||
filter(button,player){
|
||||
if(player.countMark('sbxingshang')<get.info('sbxingshang').getNum(button.link)) return false;
|
||||
switch(button.link){
|
||||
case 1:
|
||||
return game.hasPlayer(target=>target.isLinked()||target.isTurnedOver());
|
||||
|
@ -796,39 +852,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return game.dead.length;
|
||||
}
|
||||
},
|
||||
check:function(button){
|
||||
let player=_status.event.player;
|
||||
switch(button.link){
|
||||
case 1:
|
||||
return game.filterPlayer(current=>get.attitude(player,current)>0).reduce((list,target)=>{
|
||||
let num=0;
|
||||
if(target.isLinked()) num+=0.5;
|
||||
if(target.isTurnedOver()) num+=10;
|
||||
list.push(num);
|
||||
return list;
|
||||
},[]).sort((a,b)=>b-a)[0];
|
||||
case 2:
|
||||
return Math.min(5,Math.max(1,game.dead.length));
|
||||
case 3:
|
||||
return game.filterPlayer().reduce((list,target)=>{
|
||||
list.push(get.recoverEffect(target,player,player));
|
||||
return list;
|
||||
},[]).sort((a,b)=>b-a)[0];
|
||||
case 4:
|
||||
return game.dead.reduce((list,target)=>{
|
||||
let num=0;
|
||||
if(target.name&&lib.character[target.name]) num+=get.rank(target.name,true);
|
||||
if(target.name2&&lib.character[target.name2]) num+=get.rank(target.name2,true);
|
||||
list.push(num);
|
||||
return list;
|
||||
},[]).sort((a,b)=>b-a)[0];
|
||||
}
|
||||
check(button){
|
||||
const player=get.event('player'),info=get.info('sbxingshang');
|
||||
let list=Array.from({length:4}).map((_,i)=>i+1);
|
||||
list=list.filter(num=>player.countMark('sbxingshang')>=info.getNum(num));
|
||||
const num=list.sort((a,b)=>info.getEffect(player,b)-info.getEffect(player,a))[0];
|
||||
return (button.link==num)?10:0;
|
||||
},
|
||||
backup:function(links,player){
|
||||
backup(links,player){
|
||||
return {
|
||||
num:links[0],
|
||||
audio:'sbxingshang',
|
||||
filterTarget:function(card,player,target){
|
||||
filterCard:()=>false,
|
||||
selectCard:-1,
|
||||
filterTarget(card,player,target){
|
||||
switch(lib.skill.sbxingshang_use_backup.num){
|
||||
case 1:
|
||||
return target=>target.isLinked()||target.isTurnedOver();
|
||||
|
@ -882,24 +919,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.line(target2);
|
||||
game.log(player,'选择了',target2);
|
||||
const skills=target2.getStockSkills(true,true);
|
||||
const skills2=player.getStockSkills(true,true);
|
||||
const skills2=['sbxingshang','sbfangzhu','sbsongwei'];
|
||||
player.changeSkills(skills,skills2);
|
||||
}
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
result:{
|
||||
target:function(player,target){
|
||||
target(player,target){
|
||||
switch(lib.skill.sbxingshang_use_backup.num){
|
||||
case 1:
|
||||
let num=0;
|
||||
if(target.isLinked()) num+=0.5;
|
||||
if(target.isLinked()&&!target.hasSkill('nzry_jieying')) num+=0.5;
|
||||
if(target.isTurnedOver()) num+=10;
|
||||
return num;
|
||||
case 2:
|
||||
return 1;
|
||||
return get.effect(target,{name:'draw'},player,player);
|
||||
case 3:
|
||||
return get.recoverEffect(target,player,player);
|
||||
return Math.max(0,get.recoverEffect(target,player,player))+get.attitude(player,target);
|
||||
case 4:
|
||||
return 1;
|
||||
}
|
||||
|
@ -908,21 +945,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
}
|
||||
},
|
||||
prompt:function(links,player){
|
||||
prompt(links,player){
|
||||
const str='###行殇###';
|
||||
switch(links[0]){
|
||||
case 1:
|
||||
return '复原一名角色的武将牌';
|
||||
return str+'移去2个“颂”标记,复原一名角色的武将牌';
|
||||
case 2:
|
||||
return '令一名角色摸'+get.cnNumber(Math.min(5,Math.max(1,game.dead.length)))+'张牌';
|
||||
return str+'移去2个“颂”标记,令一名角色摸'+get.cnNumber(Math.min(5,Math.max(1,game.dead.length)))+'张牌';
|
||||
case 3:
|
||||
return '令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏';
|
||||
return str+'移去5个“颂”标记,令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏';
|
||||
case 4:
|
||||
return '获得一名已阵亡角色的所有技能,然后失去武将牌上的所有技能';
|
||||
return str+'移去5个“颂”标记,获得一名已阵亡角色的所有技能,然后失去武将牌上的所有技能';
|
||||
}
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:9,
|
||||
order(_,player){
|
||||
const info=get.info('sbxingshang');
|
||||
const goon=(player.hasSkill('sbfangzhu')&&(player.getStat('skill').sbfangzhu||0)<(get.info('sbfangzhu').usable||Infinity));
|
||||
let list=Array.from({length:goon?9:4}).map((_,i)=>i+1);
|
||||
list=list.filter(num=>player.countMark('sbxingshang')>=info.getNum(num));
|
||||
list.sort((a,b)=>info.getEffect(player,b)-info.getEffect(player,a));
|
||||
return (Array.from({length:4}).map((_,i)=>i+1).includes(list[0])&&info.getEffect(player,list[0])>0)?1:0;
|
||||
},
|
||||
result:{player:1},
|
||||
},
|
||||
},
|
||||
|
@ -932,118 +977,122 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sbfangzhu:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.countMark('sbxingshang')>1;
|
||||
filter(event,player){
|
||||
return player.hasMark('sbxingshang');
|
||||
},
|
||||
usable:1,
|
||||
chooseButton:{
|
||||
dialog:function(){
|
||||
dialog(){
|
||||
var dialog=ui.create.dialog('放逐:请选择你要执行的一项','hidden');
|
||||
dialog.add([[
|
||||
[1,'移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束'],
|
||||
[2,'移去2个“颂”标记,令一名其他角色不能响应除其外的角色使用的牌直到其回合结束'],
|
||||
[3,'移去3个“颂”标记,令一名其他角色将武将牌翻面'],
|
||||
[4,'移去3个“颂”标记,令一名其他角色只能使用你选择的一种类型的牌直到其回合结束']
|
||||
[1,'移去1个“颂”标记,令一名其他角色于手牌中只能使用基本牌直到其回合结束'],
|
||||
[2,'移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束'],
|
||||
[3,'移去2个“颂”标记,令一名其他角色不能响应除其外的角色使用的牌直到其回合结束'],
|
||||
[4,'移去3个“颂”标记,令一名其他角色将武将牌翻面'],
|
||||
[5,'移去3个“颂”标记,令一名其他角色于手牌中只能使用装备牌直到其回合结束']
|
||||
],'textbutton']);
|
||||
return dialog;
|
||||
},
|
||||
filter:function(button,player){
|
||||
if(button.link>2&&player.countMark('sbxingshang')<3) return false;
|
||||
if(button.link==4) return game.hasPlayer(target=>target!=player&&!target.hasSkill('sbfangzhu_ban'));
|
||||
return true;
|
||||
filter(button,player){
|
||||
if(player.countMark('sbxingshang')<get.info('sbxingshang').getNum(button.link+4)) return false;
|
||||
return game.hasPlayer(target=>{
|
||||
if(target==player) return false;
|
||||
const num=button.link,storage=target.getStorage('sbfangzhu_ban');
|
||||
return !((num==1&&storage.includes('basic'))||(num==5&&storage.includes('equip')));
|
||||
});
|
||||
},
|
||||
check:function(button){
|
||||
let player=_status.event.player;
|
||||
switch(button.link){
|
||||
case 1:
|
||||
return game.filterPlayer(current=>get.attitude(player,current)<0).reduce((list,target)=>{
|
||||
let num=0;
|
||||
if(target.name&&lib.character[target.name]) num+=get.rank(target.name,true);
|
||||
if(target.name2&&lib.character[target.name2]) num+=get.rank(target.name2,true);
|
||||
list.push(num);
|
||||
return list;
|
||||
},[]).sort((a,b)=>b-a)[0];
|
||||
case 2:
|
||||
return 0;
|
||||
case 3:
|
||||
return game.filterPlayer(target=>target!=player&&!target.hasSkill('sbfangzhu_ban')).reduce((list,target)=>{
|
||||
if(get.attitude(player,target)>0&&target.isTurnedOver()) list.push(10*target.countCards('hs')+1);
|
||||
else if(get.attitude(player,target)<0&&!target.isTurnedOver()) list.push(5*target.countCards('hs')+1);
|
||||
else list.push(0);
|
||||
return list;
|
||||
},[]).sort((a,b)=>b-a)[0];
|
||||
case 4:
|
||||
return 0;
|
||||
}
|
||||
check(button){
|
||||
const player=get.event('player'),info=get.info('sbxingshang');
|
||||
let list=Array.from({length:5}).map((_,i)=>i+1);
|
||||
list=list.filter(num=>player.countMark('sbxingshang')>=info.getNum(num+4));
|
||||
const num=list.sort((a,b)=>info.getEffect(player,b+4)-info.getEffect(player,a+4))[0]-4;
|
||||
return (button.link==num)?10:0;
|
||||
},
|
||||
backup:function(links,player){
|
||||
backup(links,player){
|
||||
return {
|
||||
num:links[0],
|
||||
audio:'sbfangzhu',
|
||||
filterTarget:lib.filter.notMe,
|
||||
filterCard:()=>false,
|
||||
selectCard:-1,
|
||||
filterTarget(card,player,target){
|
||||
if(target==player) return false;
|
||||
const num=lib.skill.sbfangzhu_backup.num,storage=target.getStorage('sbfangzhu_ban');
|
||||
return !((num==1&&storage.includes('basic'))||(num==5&&storage.includes('equip')));
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
const target=event.target;
|
||||
const num=lib.skill.sbfangzhu_backup.num;
|
||||
player.removeMark('sbxingshang',num>2?3:2);
|
||||
player.removeMark('sbxingshang',get.info('sbxingshang').getNum(num+4));
|
||||
switch(num){
|
||||
case 1:
|
||||
target.addTempSkill('sbfangzhu_ban',{player:'phaseEnd'});
|
||||
target.markAuto('sbfangzhu_ban',['basic']);
|
||||
break;
|
||||
case 2:
|
||||
target.removeSkill('baiban');
|
||||
target.addTempSkill('baiban',{player:'phaseEnd'});
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
target.addTempSkill('sbfangzhu_kill',{player:'phaseEnd'});
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
target.turnOver();
|
||||
break;
|
||||
case 4:
|
||||
const {result:{control}}=await player.chooseControl('basic','trick','equip').set('ai',()=>'equip').set('prompt','放逐:请选择'+get.translation(target)+'仅能使用的类别的牌');
|
||||
if(control){
|
||||
player.line(target);
|
||||
player.popup(get.translation(control)+'牌');
|
||||
target.addTempSkill('sbfangzhu_ban',{player:'phaseEnd'});
|
||||
target.markAuto('sbfangzhu_ban',[control]);
|
||||
}
|
||||
case 5:
|
||||
target.addTempSkill('sbfangzhu_ban',{player:'phaseEnd'});
|
||||
target.markAuto('sbfangzhu_ban',['equip']);
|
||||
break;
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
result:{
|
||||
target:function(player,target){
|
||||
target(player,target){
|
||||
switch(lib.skill.sbfangzhu_backup.num){
|
||||
case 1:
|
||||
let num=0;
|
||||
if(target.name&&lib.character[target.name]) num+=get.rank(target.name,true);
|
||||
if(target.name2&&lib.character[target.name2]) num+=get.rank(target.name2,true);
|
||||
return num;
|
||||
return -target.countCards('h',card=>get.type(card)!='basic')-1;
|
||||
case 2:
|
||||
return 0;
|
||||
return -target.getSkills(null,null,false).reduce((sum,skill)=>{
|
||||
return sum+Math.max(get.skillRank(skill,'out'),get.skillRank(skill,'in'));
|
||||
},0);
|
||||
case 3:
|
||||
return 0;
|
||||
case 4:
|
||||
if(get.attitude(player,target)>0&&target.isTurnedOver()) return 10*target.countCards('hs')+1;
|
||||
if(get.attitude(player,target)<0&&!target.isTurnedOver()) return -5*target.countCards('hs')+1;
|
||||
return 0;
|
||||
case 4:
|
||||
return 0;
|
||||
case 5:
|
||||
return -target.countCards('h',card=>get.type(card)!='equip')-3;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
prompt:function(links,player){
|
||||
prompt(links,player){
|
||||
const str='###放逐###';
|
||||
switch(links[0]){
|
||||
case 1:
|
||||
return '移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束';
|
||||
return str+'移去1个“颂”标记,令一名其他角色于手牌中只能使用基本牌直到其回合结束';
|
||||
case 2:
|
||||
return '移去2个“颂”标记,令一名其他角色不能响应除其外的角色使用的牌直到其回合结束';
|
||||
return str+'移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束';
|
||||
case 3:
|
||||
return '移去3个“颂”标记,令一名其他角色将武将牌翻面';
|
||||
return str+'移去2个“颂”标记,令一名其他角色不能响应除其外的角色使用的牌直到其回合结束';
|
||||
case 4:
|
||||
return '移去3个“颂”标记,令一名其他角色只能使用你选择的一种类型的牌直到其回合结束';
|
||||
return str+'移去3个“颂”标记,令一名其他角色将武将牌翻面';
|
||||
case 5:
|
||||
return str+'移去3个“颂”标记,令一名其他角色于手牌中只能使用装备牌直到其回合结束';
|
||||
}
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:9,
|
||||
order(_,player){
|
||||
const info=get.info('sbxingshang');
|
||||
const goon=(player.hasSkill('sbxingshang')&&(player.getStat('skill').sbxingshang_use||0)<(info.subSkill.use.usable||Infinity));
|
||||
let list=Array.from({length:goon?9:5}).map((_,i)=>i+(goon?1:5));
|
||||
list=list.filter(num=>player.countMark('sbxingshang')>=info.getNum(num));
|
||||
list.sort((a,b)=>info.getEffect(player,b)-info.getEffect(player,a));
|
||||
return (Array.from({length:5}).map((_,i)=>i+5).includes(list[0])&&info.getEffect(player,list[0])>0)?1:0;
|
||||
},
|
||||
result:{player:1},
|
||||
},
|
||||
subSkill:{
|
||||
|
@ -1054,7 +1103,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
marktext:'禁',
|
||||
intro:{content:'不能响应其他角色使用的牌'},
|
||||
trigger:{global:'useCard1'},
|
||||
filter:function(event,player){
|
||||
filter(event,player){
|
||||
return event.player!=player;
|
||||
},
|
||||
forced:true,
|
||||
|
@ -1070,14 +1119,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
marktext:'禁',
|
||||
intro:{
|
||||
markcount:()=>0,
|
||||
content:'只能使用$牌',
|
||||
content(storage){
|
||||
if(storage.length>1) return '不能使用手牌';
|
||||
return '于手牌中只能使用'+get.translation(storage[0])+'牌';
|
||||
},
|
||||
},
|
||||
mod:{
|
||||
cardEnabled:function(card,player){
|
||||
if(!player.getStorage('sbfangzhu_ban').includes(get.type2(card))) return false;
|
||||
cardEnabled(card,player){
|
||||
const storage=player.getStorage('sbfangzhu_ban');
|
||||
if(get.itemtype(card)=='card'&&get.position(card)!='h') return;
|
||||
if(storage.length>1||!storage.includes(get.type2(card))) return false;
|
||||
},
|
||||
cardSavable:function(card,player){
|
||||
if(!player.getStorage('sbfangzhu_ban').includes(get.type2(card))) return false;
|
||||
cardSavable(card,player){
|
||||
const storage=player.getStorage('sbfangzhu_ban');
|
||||
if(get.itemtype(card)=='card'&&get.position(card)!='h') return;
|
||||
if(storage.length>1||!storage.includes(get.type2(card))) return false;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1085,39 +1141,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
sbsongwei:{
|
||||
audio:2,
|
||||
init:(player)=>{
|
||||
player.addSkill('sbsongwei_delete');
|
||||
},
|
||||
trigger:{player:'phaseUseBegin'},
|
||||
filter:function(event,player){
|
||||
filter(event,player){
|
||||
if(player.countMark('sbxingshang')>=get.info('sbxingshang').getLimit) return false;
|
||||
return game.hasPlayer(target=>target.group=='wei'&&target!=player);
|
||||
},
|
||||
zhuSkill:true,
|
||||
forced:true,
|
||||
locked:false,
|
||||
async content(event,trigger,player){
|
||||
player.addMark('sbxingshang',game.countPlayer(target=>target.group=='wei'&&target!=player));
|
||||
player.addMark('sbxingshang',Math.min(get.info('sbxingshang').getLimit-player.countMark('sbxingshang'),game.countPlayer(target=>target.group=='wei'&&target!=player)));
|
||||
},
|
||||
group:'sbsongwei_delete',
|
||||
subSkill:{
|
||||
delete:{
|
||||
audio:'sbsongwei',
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
filter(event,player){
|
||||
if(player.storage.sbsongwei_delete) return false;
|
||||
return game.hasPlayer(target=>lib.skill.sbsongwei.subSkill.delete.filterTarget(null,player,target));
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
filterTarget(card,player,target){
|
||||
return target!=player&&target.group=='wei'&&target.getStockSkills(false,true).length;
|
||||
},
|
||||
skillAnimation:true,
|
||||
animationColor:'thunder',
|
||||
async content(event,trigger,player){
|
||||
player.storage.sbsongwei_delete=true;
|
||||
player.awakenSkill('sbsongwei_delete');
|
||||
event.target.removeSkills(event.target.getStockSkills(false,true));
|
||||
},
|
||||
ai:{
|
||||
order:13,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
target(player,target){
|
||||
return -target.getStockSkills(false,true).length;
|
||||
},
|
||||
},
|
||||
|
@ -2678,7 +2735,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sbguose:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
usable:4,
|
||||
get usable(){
|
||||
return get.mode()=='identity'?4:2;
|
||||
},
|
||||
discard:false,
|
||||
lose:false,
|
||||
delay:false,
|
||||
|
@ -3993,7 +4052,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{player:'phaseUseEnd'},
|
||||
zhuSkill:true,
|
||||
unique:true,
|
||||
direct:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
if(!player.hasZhuSkill('sbjijiang')) return false;
|
||||
return game.hasPlayer(current=>{
|
||||
|
@ -4001,59 +4060,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return game.hasPlayer(currentx=>current.inRange(currentx));
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var next=player.chooseTarget(get.prompt2('sbjijiang'),2);
|
||||
next.set('filterTarget',(card,player,target)=>{
|
||||
if(!ui.selected.targets.length) return true;
|
||||
async cost(event,trigger,player){
|
||||
event.result=await player.chooseTarget(get.prompt2('sbjijiang'),2).set('filterTarget',(card,player,target)=>{
|
||||
if(!ui.selected.targets.length) return target.group=='shu'&&target.hp>=player.hp&&target!=player;
|
||||
var current=ui.selected.targets[0];
|
||||
if(current.group=='shu'&¤t.hp>=player.hp&¤t!=player){
|
||||
return current.inRange(target);
|
||||
}
|
||||
else{
|
||||
return target.group=='shu'&&target.hp>=player.hp&&target.inRange(current)&&target!=player;
|
||||
}
|
||||
})
|
||||
next.set('targetprompt',target=>{
|
||||
var player=_status.event.player;
|
||||
if(target.group=='shu'&&target.hp>=player.hp&&target!=player&&!ui.selected.targets.some(i=>{
|
||||
return i!=target&&i.hp>=player.hp&&i.group=='shu';
|
||||
})) return '进行选择';
|
||||
return '出杀对象';
|
||||
});
|
||||
next.set('ai',target=>{
|
||||
return current.inRange(target);
|
||||
}).set('targetprompt',['进行选择','出杀对象']).set('multitarget',true).set('ai',target=>{
|
||||
var player=_status.event.player;
|
||||
if(ui.selected.targets.length){
|
||||
var current=ui.selected.targets[0];
|
||||
if(current.group=='shu'&¤t.hp>=player.hp&¤t!=player){
|
||||
return -get.attitude(player,target);
|
||||
}
|
||||
return Math.abs(get.attitude(player,current));
|
||||
return get.effect(target,new lib.element.VCard({name:'sha'}),current,player);
|
||||
}
|
||||
else{
|
||||
if(target.group=='shu'&&target.hp>=player.hp&&target!=player&&game.hasPlayer(current=>{
|
||||
return get.attitude(player,current)<0;
|
||||
})) return 10;
|
||||
return 1;
|
||||
let curs=game.filterPlayer(current=>{
|
||||
return target!==current&&target.inRange(current)&&target.canUse({name:'sha',isCard:true},current,false);
|
||||
});
|
||||
if(!curs.length){
|
||||
let att=get.attitude(player,target);
|
||||
if(att>=0) return 0;
|
||||
return -att*get.threaten(target,player);
|
||||
}
|
||||
})
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var targets=result.targets;
|
||||
event.targets=targets;
|
||||
if(targets[0].group!='shu'||targets[0].hp<player.hp||targets[0]==player) targets.reverse();
|
||||
player.logSkill('sbjijiang',targets,false);
|
||||
player.line2(targets);
|
||||
var choiceList=[
|
||||
'视为对'+get.translation(targets[1])+'使用一张【杀】',
|
||||
'你的下一个出牌阶段开始前,跳过此阶段'
|
||||
];
|
||||
targets[0].chooseControl().set('choiceList',choiceList).set('ai',()=>{
|
||||
return _status.event.choice;
|
||||
}).set('choice',get.effect(targets[1],{name:'sha'},targets[0],targets[0])>get.effect(targets[0],{name:'lebu'},targets[0],targets[0])?0:1);
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
return curs.reduce((max,i)=>Math.max(max,get.effect(i,new lib.element.VCard({name:'sha'}),target,player)),-1);
|
||||
}).forResult();
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
let targets=event.targets;
|
||||
player.logSkill('sbjijiang',targets,false);
|
||||
player.line2(targets);
|
||||
var choiceList=[
|
||||
'视为对'+get.translation(targets[1])+'使用一张【杀】',
|
||||
'你的下一个出牌阶段开始前,跳过此阶段'
|
||||
],result;
|
||||
if(!targets[0].canUse({name:'sha',isCard:true},targets[1],false)) result={index:1};
|
||||
else result=await targets[0].chooseControl().set('choiceList',choiceList).set('ai',()=>{
|
||||
return _status.event.choice;
|
||||
}).set('choice',get.effect(targets[1],{name:'sha'},targets[0],targets[0])>get.effect(targets[0],{name:'lebu'},targets[0],targets[0])?0:1).forResult();
|
||||
if(result.index==0){
|
||||
targets[0].useCard({name:'sha',isCard:true},targets[1],false);
|
||||
}
|
||||
|
@ -6967,7 +7007,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sbzhiba_info:'主公技,限定技。当你进入濒死状态时,你可以回复X-1点体力并修改〖激昂③〗为“出牌阶段限X次”(X为场上其他吴势力角色数+1)。然后其他吴势力角色依次受到1点无来源伤害,且当有角色因此死亡后,你摸三张牌。',
|
||||
sb_daqiao:'谋大乔',
|
||||
sbguose:'国色',
|
||||
sbguose_info:'出牌阶段限四次。你可以选择一项:1.将一张♦牌当【乐不思蜀】使用;2.弃置场上一张【乐不思蜀】。然后你摸一张牌。',
|
||||
sbguose_info:'出牌阶段限两次,你可以将一张♦牌当【乐不思蜀】使用或弃置场上一张【乐不思蜀】,然后你摸一张牌。',
|
||||
sbguose_info_identity:'出牌阶段限四次,你可以将一张♦牌当【乐不思蜀】使用或弃置场上一张【乐不思蜀】,然后你摸一张牌。',
|
||||
sbliuli:'流离',
|
||||
sbliuli_info:'当你成为【杀】的目标时,你可以弃置一张牌并选择你攻击范围内的一名不为此【杀】使用者的角色,将此【杀】转移给该角色。若你以此法弃置了♥牌,则你可以令一名不为此【杀】使用者的其他角色获得“流离”标记,且移去场上所有其他的“流离”(每回合限一次)。有“流离”的角色回合开始时,其移去其“流离”并执行一个额外的出牌阶段。',
|
||||
sb_liubiao:'谋刘表',
|
||||
|
@ -7028,9 +7069,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sb_caopi:'谋曹丕',
|
||||
sb_caopi_prefix:'谋',
|
||||
sbxingshang:'行殇',
|
||||
sbxingshang_info:'①每回合限一次,当一名角色死亡时或受到伤害时,你获得1个“颂”标记。②出牌阶段限一次,你可以:1.移去1个“颂”标记,令一名角色复原武将牌;2.移去2个“颂”标记,令一名角色摸X张牌(X为场上阵亡角色数,且X至少为1,至多为5);3.移去3个“颂”标记,令一名体力上限小于10的角色加1点体力上限,回复1点体力,随机恢复一个已废除的装备栏;4.移去4个“颂”标记,获得一名阵亡角色武将牌上的所有技能,然后你失去武将牌上的所有技能。',
|
||||
sbxingshang_info:'①当一名角色受到伤害后(每回合限一次)或死亡时,你获得2个“颂”标记(你至多拥有9个“颂”标记)。②出牌阶段限两次,你可以:1.移去2个“颂”标记,令一名角色复原武将牌;2.移去2个“颂”标记,令一名角色摸X张牌(X为场上阵亡角色数,且X至少为1,至多为5);3.移去5个“颂”标记,令一名体力上限小于10的角色加1点体力上限,回复1点体力,随机恢复一个已废除的装备栏;4.移去5个“颂”标记,获得一名阵亡角色武将牌上的所有技能,然后你失去〖行殇〗〖放逐〗〖颂威〗。',
|
||||
sbfangzhu:'放逐',
|
||||
sbfangzhu_info:'出牌阶段限一次,你可以:1.移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束;2.移去2个“颂”标记,令一名其他角色不能响应除其以外的角色使用的牌直到其回合结束;3.移去3个“颂”标记,令一名其他角色将武将牌翻面;4.移去3个“颂”标记,令一名其他角色只能使用你选择的一种类型的牌直到其回合结束。',
|
||||
sbfangzhu_info:'出牌阶段限一次,你可以:1.移去1个“颂”标记,令一名其他角色于手牌中只能使用基本牌直到其回合结束;2.移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束;3.移去2个“颂”标记,令一名其他角色不能响应除其以外的角色使用的牌直到其回合结束;4.移去3个“颂”标记,令一名其他角色将武将牌翻面;5.移去3个“颂”标记,令一名其他角色于手牌中只能使用装备牌直到其回合结束。',
|
||||
sbsongwei:'颂威',
|
||||
sbsongwei_info:'主公技。①出牌阶段开始时,你获得Y个“颂”标记(Y为场上其他魏势力角色数)。②每局游戏限一次,出牌阶段,你可以令一名其他魏势力角色失去所有武将牌的技能。',
|
||||
sb_xunyu:'谋荀彧',
|
||||
|
|
|
@ -5441,8 +5441,6 @@ game.import('character',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;
|
||||
},
|
||||
|
@ -6208,8 +6206,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
"step 2"
|
||||
if(result.suit=='club'){
|
||||
event.target.damage('thunder');
|
||||
player.recover();
|
||||
event.target.damage('thunder');
|
||||
}
|
||||
else if(result.suit=='spade'){
|
||||
event.target.damage(2,'thunder');
|
||||
|
@ -8048,7 +8046,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
quhu_info:'出牌阶段限一次,你可以与一名体力值大于你的角色拼点,若你赢,则该角色对其攻击范围内另一名由你指定的角色造成1点伤害。若你没赢,该角色对你造成1点伤害。',
|
||||
jieming_info:'当你受到1点伤害后,你可令一名角色将手牌摸至X张(X为其体力上限且至多为5)。',
|
||||
qiangxi_info:'出牌阶段限一次,你可以失去1点体力或弃置一张武器牌,然后对你攻击范围内的一名其他角色造成1点伤害。',
|
||||
qiangxix_info:'出牌阶段限两次,你可以失去1点体力或弃置一张武器牌,然后一名本阶段内未成为过〖强袭〗的目标的其他角色造成1点伤害。',
|
||||
qiangxix_info:'出牌阶段限两次,你可以失去1点体力或弃置一张武器牌,然后对一名本阶段内未成为过〖强袭〗的目标的其他角色造成1点伤害。',
|
||||
tianyi_info:'出牌阶段限一次,你可以和一名其他角色拼点。若你赢,你获得以下技能效果直到回合结束:你使用【杀】没有距离限制;可额外使用一张【杀】;使用【杀】时可额外指定一个目标。若你没赢,你不能使用【杀】直到回合结束。',
|
||||
shuangxiong_info:'摸牌阶段,你可以改为进行一次判定:你获得此判定牌,且你可以于此回合内将任意一张与此判定牌不同颜色的手牌当做【决斗】使用。',
|
||||
luanji_info:'出牌阶段,你可以将任意两张相同花色的手牌当做【万箭齐发】使用。',
|
||||
|
@ -8113,7 +8111,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xinkuanggu_info:'当你造成1点伤害后,若受伤角色受到此伤害时你与其的距离不大于1,则你可以回复1点体力或摸一张牌。',
|
||||
xinliegong_info:'①你使用【杀】可以选择你距离不大于此【杀】点数的角色为目标。②当你使用【杀】指定一个目标后,你可以根据下列条件执行相应的效果:1.其手牌数小于等于你的手牌数,此【杀】不可被响应,2.其体力值大于等于你的体力值,此【杀】伤害+1。',
|
||||
jiewei_info:'当你的武将牌翻面后,你可以摸一张牌。然后你可以使用一张锦囊牌或装备牌,并可以在此牌结算后弃置场上一张同类型的牌。',
|
||||
releiji_info:'当你使用或打出一张【闪】时,你可令一名其他角色进行一次判定:若结果为梅花,其受到1点雷电伤害,然后你回复1点体力;若结果为黑桃,其受到2点雷电伤害。',
|
||||
releiji_info:'当你使用或打出一张【闪】时,你可令一名其他角色进行一次判定:若结果为梅花,你回复1点体力,并对其造成1点雷电伤害;若结果为黑桃,你对其造成2点雷电伤害。',
|
||||
tiangong_info:'锁定技,你防止即将受到的雷电伤害。每当你造成雷电伤害时,你摸一张牌。',
|
||||
shensu_info:'你可以跳过判定阶段和摸牌阶段,或跳过出牌阶段并弃置一张装备牌。若如此做,则你可以视为对任意一名角色使用一张无距离限制的【杀】。',
|
||||
jushou_info:'结束阶段,你可以摸三张牌并翻面。',
|
||||
|
|
|
@ -231,7 +231,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xiahouxuan:'夏侯玄(209年~254年),字泰初(《三国志》等作太初),沛国谯县(今安徽省亳州市)人。三国时期曹魏大臣、思想家、文学家,征南大将军夏侯尚之子,大将军曹爽的表弟。夏侯玄少年有名望,仪表出众,时人称为“朗朗如日月之入怀”。魏文帝黄初六年(225年),袭封昌陵乡侯。魏明帝时,历任散骑黄门侍郎、羽林监。少帝曹芳继位后,拜散骑常侍、中护军,保卫皇宫。后任征西将军,任内与曹爽策划骆谷之役,大失人心。高平陵政变后,被夺去兵权,改任大鸿胪、太常卿。嘉平六年(254年),中书令李丰与外戚张缉密谋杀死大将军司马师,改以夏侯玄执政。事泄被杀,夷灭三族,夏侯玄死时年仅四十六岁。著有文集三卷,如今已佚。政治上,提出了“审官择人”、“除重官”、“改服制”等制度,被太傅司马懿评价“皆大善”。博学多识,才华出众,精通玄学,成为“四聪”之一,与何晏等人开创了魏晋玄学的先河,是早期的玄学领袖人物。',
|
||||
dengzhong:'邓忠(不详-264年),三国时期曹魏名将邓艾之子。景元五年(264年),钟会谋反事败,士兵哗变,钟会被杀,邓艾部将想追还邓艾父子,但卫瓘却派田续追邓艾,于绵竹西相遇,将邓艾和邓忠等人杀死。直至泰始九年(273年)才恢复名节。',
|
||||
wangyan:'王衍(256年~311年),字夷甫,琅邪郡临沂县(今山东省临沂市)人。西晋末年重臣,玄学清谈领袖,曹魏幽州刺史王雄之孙、平北将军王乂之子、司徒王戎堂弟。王衍出身琅琊王氏。外表清明俊秀,风姿安详文雅,笃好老庄学说,颇有时名。步入仕途后,历任黄门侍郎、中领军、尚书令、尚书仆射等职。光熙元年(307年),升任司空。次年,又任司徒。王衍位高权重,却不思为国,为保全自己,还让弟弟王澄、族弟王敦分任荆州、青州刺史,遭时人鄙夷。王弥进攻洛阳时,王衍率军抵抗。其后转任太尉兼尚书令,又兼领太傅军司。永嘉五年(311年),东海王司马越去世,王衍奉其灵柩返回东海,途中为羯人石勒所俘获。王衍在与石勒交谈时,仍推脱责任,并劝其称帝,石勒大怒,将其与西晋旧臣一同活埋,时年五十六岁。王衍工书法,尤擅行书,《宣和书谱》有其作品《尊夫人帖》。',
|
||||
caoxiancaohua:'请分别查询参考「曹宪」和「曹华」的部武将介绍。',
|
||||
caoxiancaohua:'请分别查看「曹宪」和「曹华」的武将介绍。',
|
||||
zhaoyǎn:'赵俨(171~245年),字伯然,颍川阳翟(今河南禹州市)。东汉末年颍川“四大名士”之一,三国时期魏国名臣。熟读经史,精明强干。建安二年,投靠大将军曹操之后,起家朗陵县令,历任司空府掾、司空主薄、都督护军、扶风太守等职。魏文帝曹丕继位后,历任魏国侍中、驸马都尉、河东太守、典农中郎将、度支尚书,封宜土亭侯。魏明帝曹睿时期,历任大司农、骠骑将军、大司空等职。正始六年,去世,时年七十五,谥号为穆。',
|
||||
ruiji:'芮姬,芮玄之女,太子孙登妃,黄武五年卒。',
|
||||
weizi:'卫兹(?-190年),字子许,(《三国演义》中其名为卫弘,当为误记),陈留襄邑(今河南睢县)人。曾举孝廉,先后被车骑将军何苗、司徒杨赐等召辟。中平六年(189年)十二月,曹操在陈留己吾募兵,而卫兹以家财资助曹操,使曹操顺利募得五千士兵。此后,卫兹与曹操共同讨伐董卓。初平元年(190年),卫兹在跟随曹操讨伐董卓途中,于荥阳汴水遭遇董卓军徐荣,力战终日,失利身亡。',
|
||||
|
@ -248,7 +248,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
panshu:'潘淑(?-252年),会稽句章(今浙江省宁波市)人,是吴大帝孙权的皇后,吴少帝孙亮的母亲。和孙权是中国历代帝后中年龄差距较大的一对。潘淑少时与姐姐俱没入织室,容媚有宠,拜为夫人,生有一子孙亮。赤乌十三年(250年),孙权立孙亮为皇太子,翌年(251年)立潘淑为皇后。神凤元年(252年)暴崩,合葬蒋陵。世称潘淑为江东绝色,有神女之称。',
|
||||
zongyu:'宗预(?-264年),字德艳 ,荆州南阳郡安众县(今河南省南阳市)人。三国时期蜀汉官员、将领。曾随张飞入蜀助平益州,又受辟为丞相诸葛亮手下主簿,升任参军、右中郎将。诸葛亮逝世后,宗预受命出使孙吴,得到孙权的赞赏。迁后将军,出督永安,又升任征西大将军,并受封关内侯。公元258年(景耀元年),因病回成都,受任镇军大将军。蜀汉灭亡后,宗预随后主刘禅徙往洛阳,在中途病逝。宗预为人坦率耿直,多次出使孙吴并深得孙权的敬重,为吴、汉两国同盟的巩固作出了一定的贡献。',
|
||||
mengda:'孟达(?-228),字子度,本字子敬,因刘备的叔父名叫刘子敬,为避讳而改字。扶风郡郿人,三国时期人物。本为刘璋属下,后降刘备。关羽围樊城、襄阳时因不发兵救关羽而触怒刘备,于是投奔曹魏。此后,劝降刘封,未果。在魏官至散骑常侍、建武将军,封平阳亭侯。此后又欲反曹魏而归蜀汉,事败而死。',
|
||||
wolongfengchu:'沙比武将,懒得复制粘贴,自己去看诸葛亮和庞统的介绍吧。',
|
||||
wolongfengchu:'沙比武将,懒得复制粘贴,自己去看「诸葛亮」和「庞统」的介绍吧。',
|
||||
caoshuang:'曹爽(?-249年2月9日),字昭伯,沛国谯县(今安徽亳州市)人。三国时期魏国权臣,大司马曹真长子。曹爽体态肥胖,凭借宗室身份,出入宫廷,交好太子曹叡。魏明帝即位,起家员外散骑侍郎,累迁城门校尉、散骑常侍,转武卫将军。太和五年(231年),袭封邵陵侯。景初三年(239年),魏明帝曹叡病危,拜大将军、假黄钺,与司马懿并为托孤大臣。少帝曹芳即位,加侍中,改封武安侯。势倾四海,声震天下。任用私人,专权乱政,侵吞公产。伐蜀失败,虚耗国力。起居逾制,软禁郭太后。正始十年,太傅司马懿发动高平陵政变,掌握魏国大权。曹爽失去大将军职务,以谋反之罪处死,夷灭三族。',
|
||||
zhangling:'张道陵(34年2月22日—156年),字辅汉,原名陵,道教正一道实际创立者,汉朝东汉时期丰邑(今江苏徐州丰县)人。太上老君降临蜀地,“授以三天正法,命为天师”,张道陵整合当时的:黄老派、方仙道、文始派等先秦修道团体,创立道教称正一盟威之道。后世尊称为“老祖天师”、“正一真人”、“三天扶教大法师”、高明上帝、张天师。著作《老子想尔注》,弟子有3000多人,设立24治,奠基天师道。张道陵、葛玄、许逊、萨守坚合称四大天师。张道陵创建道教的背景:当时在巴蜀一带,原有巴人信奉原始巫教,大规模的淫祀而害民。而这些祀奉鬼妖(学名为:妖邪)的法教巫师聚众敛财,无恶不作。张天师携王长、赵升二位弟子和黄帝九鼎丹经,来到北邙山修行,平定了那些祸害百姓的巫妖之教。川渝一带流传的张天师以太上老君剑印符箓大破鬼兵的故事就是以此为原型的。',
|
||||
caiyang:'蔡阳(?-201年),又作蔡扬,东汉丞相曹操部下武将,汝南太守。于建安六年(201)奉曹操之命攻击与刘备联合的汝南贼龚都等人,兵败被刘备所杀。明代小说《三国演义》改编为“云长擂鼓斩蔡阳”。',
|
||||
|
@ -288,7 +288,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
bianfuren:'武宣皇后卞氏(159年12月30日-230年7月9日),琅邪开阳(今山东临沂)人,魏武帝曹操的正妻(继室),魏文帝曹丕、任城威王曹彰、陈思王曹植、萧怀王曹熊的母亲。原本是倡家,即汉代专门从事音乐歌舞的乐人家庭,后来与曹操成婚,建安初年,原配丁夫人被废,卞夫人成为曹操的正妻。曹丕继位后尊其为皇太后,曹叡继位后尊其为太皇太后。卞后在太和四年去世,与魏武帝曹操合葬高陵。',
|
||||
shamoke:'沙摩柯(?-222年),东汉末三国时期五溪蛮首领。汉章武元年(221年)初,为报关羽被东吴杀害之仇,刘备亲自领兵攻孙权,以金锦爵赏诱沙摩柯助战。章武二年(222年),吴大都督陆逊以火攻破刘备,率诸军齐击,汉军四十多个营寨被攻破,沙摩柯在大乱中匹马奔逃,被乱军杀死。',
|
||||
lvfan:'吕范(?-228年),字子衡。汝南郡细阳县(今安徽太和)人。汉末至三国时期吴国重臣。吕范年轻为汝南县吏,后避难寿春,结识孙策。此后随孙策、孙权征伐四方,对稳固孙氏在江东的统治做出了杰出的贡献,孙权将其比之于东汉开国元勋吴汉。吴国建立后,吕范累官至前将军、假节、扬州牧,封南昌侯。黄武七年(228年),吕范被拜为大司马,未得授官,便已病逝。孙权悲痛不已,遣使赠其大司马印绶。孙权还都建业后,以太牢礼祭祀吕范。',
|
||||
liqueguosi:"请分别参考武将【李傕】和【郭汜】各自的介绍。",
|
||||
liqueguosi:"请分别查看「李傕」和「郭汜」的武将介绍。",
|
||||
maojie:"毛玠(?—216年),字孝先,陈留平丘(今河南封丘)人。东汉末年大臣。年少时为县吏,以清廉公正著称。因战乱而打算到荆州避乱,但中途知道刘表政令不严明,因而改往鲁阳。后来投靠曹操,提出“奉天子以令不臣,脩耕植,畜军资”的战略规划,得到曹操的欣赏。<br>毛玠与崔琰主持选举,所举用的都是清廉正直之士。而毛玠为人廉洁,激起天下廉洁之风,一改朝中奢华风气。曹操大为赞赏,曹丕也亲自去拜访他。<br>曹操获封魏公后,毛玠改任尚书仆射,再典选举。又密谏曹操应该立嫡长子曹丕为魏国太子。崔琰被杀后,毛玠十分不快。后来有人诬告毛玠,曹操大怒,将毛玠收于狱中。及后在桓阶、和洽营救下,只被免职,不久逝世于家中。曹操在他死后赐他棺材和钱帛。",
|
||||
|
||||
huangfusong:'字义真。安定郡朝那县(今宁夏彭阳)人。于黄巾起义时,以中郎将身份讨伐黄巾,用火攻大破张梁、张宝。后接替董卓进攻张梁,连胜七阵。掘张角墓,拜左车骑将军、冀州牧,因拒绝贿赂宦官而被免职。 董卓死,王允命其与吕布等共至郿坞抄籍董卓家产、人口,皇甫嵩将坞中所藏良家子女,尽行释放。',
|
||||
|
@ -297,7 +297,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
jiling:'东汉末年袁术帐下将领,勇猛非常,曾奉命率军攻打小沛的刘备,在吕布辕门射戟的调停下撤兵。',
|
||||
zoushi:'军阀张济之妻,张绣之婶。张绣降曹后,邹氏遂被曹操霸占。贾诩献计趁机诛杀曹操,险些得手。曹操在损失爱将典韦、侄子曹安民和长子曹昂后方才逃出生天。',
|
||||
ganfuren:'刘备起兵后,于沛城娶甘氏为妾。后来,甘夫人随刘备到荆州,生了阿斗(也就是后主刘禅)。223年四月,刘备病死于白帝城,追谥甘夫人为“昭烈皇后”。',
|
||||
jiangfei:'请分别查阅【蒋琬】和【费袆】各自的介绍。',
|
||||
jiangfei:'请分别查看「蒋琬」和「费袆」的武将介绍。',
|
||||
mifuren:'刘备夫人。徐州别驾糜竺之妹。长坂兵败,她怀抱年仅两岁的刘禅在乱军中走散,被赵云发现;但麋夫人因为赵云只有一匹马,不肯上马,在将阿斗托付给赵云后投井而亡。',
|
||||
chendong:'陈武,东吴将领,孙策攻打刘繇,陈武前来相助,孙策非常喜爱陈武,拜为校尉,使作先锋。陈武以十数骑兵力杀敌五十余人。后于赤壁等战役屡立功勋。董袭献上严虎的人头来降孙策。赤壁之战,董袭受周瑜命,分兵去汉阳,合肥会战时接应太史慈,逍遥津支援孙权。濡须口之战时,董袭在船上督战,船覆董袭坚守殉职。',
|
||||
jiangqing:'擅长弓术。与周泰原为活跃于长江一带的江贼,孙策脱离袁术下江东自立门户时,和周泰一起率众投靠。 孙策攻刘繇,并引出城中麾下的陈横、薛礼、张英三名将领,陈横后被蒋钦一箭射杀,后与韩当等将乘舟过江,乱箭射杀敌军。曾在赤壁之战与周泰,还有擅使长枪的韩当率领水军在三江口踏江破敌。',
|
||||
|
@ -1219,10 +1219,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result2.bool){
|
||||
const card=result2.cards[0];
|
||||
if(get.name(card,target)==event.result.card.name){
|
||||
player.popup('诿解成功');
|
||||
player.popup('洗具');
|
||||
stop=true;
|
||||
}
|
||||
else player.popup('诿解失败');
|
||||
else player.popup('杯具');
|
||||
}
|
||||
}
|
||||
if(!stop){
|
||||
|
@ -1747,11 +1747,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var {result:{bool,cards}}=await player.chooseToGive(get.prompt2('olxiangzuo',target),[1,num],'he').set('ai',card=>{
|
||||
var player=_status.event.player,target=_status.event.target;
|
||||
if(player.getHistory('useSkill',evt=>{
|
||||
return (evt.skill=='olgongjie'||evt.skill=='olxiangxv')&&evt.targets.includes(target);
|
||||
return evt.skill=='olgongjie'&&evt.targets.includes(target);
|
||||
}).length&&player.getHistory('useSkill',evt=>{
|
||||
return evt.skill=='olxiangxv'&&evt.targets.includes(target);
|
||||
}).length){
|
||||
if(get.attitude(player,target)>0) return 1;
|
||||
if(player.canSaveCard(card,player)) return 0;
|
||||
if(ui.selected.cards.length+player.hp==player.maxHp) return 0;
|
||||
if(ui.selected.cards.length+player.hp>=player.maxHp) return 0;
|
||||
return 20-get.value(card);
|
||||
}
|
||||
else{
|
||||
|
@ -1762,7 +1764,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!bool) return;
|
||||
player.awakenSkill('olxiangzuo');
|
||||
if(player.getHistory('useSkill',evt=>{
|
||||
return (evt.skill=='olgongjie'||evt.skill=='olxiangxv')&&evt.targets.includes(target);
|
||||
return evt.skill=='olgongjie'&&evt.targets.includes(target);
|
||||
}).length&&player.getHistory('useSkill',evt=>{
|
||||
return evt.skill=='olxiangxv'&&evt.targets.includes(target);
|
||||
}).length) player.recover(cards.length);
|
||||
},
|
||||
},
|
||||
|
@ -3038,6 +3042,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
olcangxin:{
|
||||
audio:2,
|
||||
trigger:{player:'damageBegin4'},
|
||||
filter(event,player){
|
||||
return game.getGlobalHistory('everything',evt=>{
|
||||
return evt.name=='damage'&&evt.player==player;
|
||||
},event).indexOf(event)==0;
|
||||
},
|
||||
checkx:function(event,player){
|
||||
var target=event.source;
|
||||
return get.damageEffect(player,target,target)<=0;
|
||||
|
@ -3046,17 +3055,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
var cards=get.bottomCards(3,true);
|
||||
player.chooseButton(['###藏心:请选择要弃置的牌###若以此法弃置了红桃牌,则防止此伤害',cards],[1,cards.length],true).set('ai',function(button){
|
||||
player.chooseButton(['###藏心:请选择要弃置的牌###若以此法弃置了红桃牌,则减少弃置红桃牌数的伤害',cards],[1,cards.length],true).set('ai',function(button){
|
||||
if(!_status.event.bool&&get.suit(button.link,false)=='heart') return 0;
|
||||
if(get.suit(button.link,false)!='heart') return 1;
|
||||
if(!ui.selected.buttons.some(but=>get.suit(but.link,false)=='heart')) return 1;
|
||||
const num=get.event().getTrigger().num;
|
||||
if(num>ui.selected.buttons.filter(but=>get.suit(but.link,false)=='heart').length) return 1;
|
||||
return 0;
|
||||
}).set('bool',lib.skill.olcangxin.checkx(trigger,player));
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
player.$throw(result.links,1000);
|
||||
game.cardsDiscard(result.links);
|
||||
if(result.links.some(card=>get.suit(card,false)=='heart')) trigger.cancel();
|
||||
const num=result.links.filter(card=>get.suit(card,false)=='heart').length;
|
||||
if(num) trigger.num-=Math.min(trigger.num,num);
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
|
@ -4761,7 +4772,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.goto(2);
|
||||
}
|
||||
else{
|
||||
var choices=['〇','一','二'];
|
||||
var choices=['零','一','二'];
|
||||
player.chooseControl(choices).set('prompt','镇荧:请选择要将手牌调整至的张数').set('ai',()=>{
|
||||
return [0,1,2].randomGet();
|
||||
});
|
||||
|
@ -11526,12 +11537,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else event.finish();
|
||||
'step 5'
|
||||
player.chooseTarget('是否令一名手牌数小于自己的目标角色摸一张牌?',function(card,player,target){
|
||||
return _status.event.getParent().targets.includes(target)&&target.countCards('h')<player.countCards('h');
|
||||
}).set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
return get.attitude(player,target);
|
||||
});
|
||||
var ph = player.countCards('h');
|
||||
if(ph>0&&targets.some(target=>target.isIn()&&target.countCards('h')<ph)){
|
||||
player.chooseTarget('请选择一名手牌数小于自己的目标角色,令其摸一张牌',function(card,player,target){
|
||||
return _status.event.getParent().targets.includes(target)&&target.countCards('h')<player.countCards('h');
|
||||
}).set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
return get.attitude(player,target);
|
||||
});
|
||||
}
|
||||
'step 6'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
|
@ -16624,7 +16638,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.subtype(card)=='equip1';
|
||||
});
|
||||
if(!equip1){
|
||||
player.popup('连计失败');
|
||||
player.popup('杯具');
|
||||
game.log('牌堆中无装备');
|
||||
event.finish();
|
||||
return;
|
||||
|
@ -20121,8 +20135,6 @@ game.import('character',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;
|
||||
},
|
||||
|
@ -25521,12 +25533,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
break;
|
||||
case 2:
|
||||
player.line(trigger.player,'green');
|
||||
/*
|
||||
var card1=trigger.player.getCards('h').randomGet();
|
||||
var card2=trigger.player.getCards('e').randomGet();
|
||||
var list=[];
|
||||
if(card1) list.push(card1);
|
||||
if(card2) list.push(card2);
|
||||
if(list.length) player.gain(list,trigger.player,'giveAuto','bySelf');
|
||||
*/
|
||||
const cards=trigger.player.getGainableCards(player,'he');
|
||||
if(cards.length) player.gain(cards.randomGets(2),trigger.player,'giveAuto','bySelf');
|
||||
break;
|
||||
}
|
||||
'step 2'
|
||||
|
@ -26544,7 +26560,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
fujian:'伏间',
|
||||
fujian_info:'锁定技,准备阶段和结束阶段,你随机观看一名手牌数不为全场最多的其他角色的手牌。',
|
||||
xinfu_xionghuo:'凶镬',
|
||||
xinfu_xionghuo_info:'游戏开始时,你获得3个“暴戾”标记(标记上限为3)。出牌阶段,你可以交给一名其他角色一个“暴戾”标记。当你对有“暴戾”标记的其他角色造成伤害时,此伤害+1。有“暴戾”标记的其他角色的出牌阶段开始时,其移去所有“暴戾”标记并随机执行一项:1.受到1点火焰伤害且本回合不能对你使用【杀】;2.失去1点体力且本回合手牌上限-1;3.你随机获得其一张手牌和一张装备区的牌。',
|
||||
xinfu_xionghuo_info:'游戏开始时,你获得3个“暴戾”标记(标记上限为3)。出牌阶段,你可以交给一名其他角色一个“暴戾”标记。当你对有“暴戾”标记的其他角色造成伤害时,此伤害+1。有“暴戾”标记的其他角色的出牌阶段开始时,其移去所有“暴戾”标记并随机执行一项:1.受到1点火焰伤害且本回合不能对你使用【杀】;2.失去1点体力且本回合手牌上限-1;3.你随机获得其两张牌。',
|
||||
xinfu_shajue:'杀绝',
|
||||
xinfu_shajue_info:'锁定技,其他角色进入濒死状态时,你获得一个“暴戾”标记。然后若其体力值小于0,你获得使其进入濒死状态的牌。',
|
||||
xinfu_jianjie:"荐杰",
|
||||
|
@ -27384,7 +27400,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
spolzhouxuan_info:'①弃牌阶段开始时,你可将任意张置于武将牌上,称为“旋”(你至多拥有五张“旋”)。②当你使用牌时,你随机将一张“旋”置入弃牌堆,然后摸一张牌(若你的手牌数不为全场唯一最多则额外摸X张牌,X为“旋”数)。③出牌阶段结束时,你将所有“旋”置入弃牌堆。',
|
||||
wuyan:'吾彦',
|
||||
lanjiang:'澜疆',
|
||||
lanjiang_info:'结束阶段,你可以选择所有手牌数不小于你的角色。这些角色依次选择是否令你摸一张牌。然后你可以对其中一名手牌数等于你的角色造成1点伤害,随后可以令其中一名手牌数小于你的角色摸一张牌。',
|
||||
lanjiang_info:'结束阶段,你可以选择所有手牌数不小于你的角色。这些角色依次选择是否令你摸一张牌。然后你可以对其中一名手牌数等于你的角色造成1点伤害,随后令其中一名手牌数小于你的角色摸一张牌。',
|
||||
ol_zhuling:'OL朱灵',
|
||||
ol_zhuling_prefix:'OL',
|
||||
jixian:'急陷',
|
||||
|
@ -27672,7 +27688,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ol_luyusheng:'OL陆郁生',
|
||||
ol_luyusheng_prefix:'OL',
|
||||
olcangxin:'藏心',
|
||||
olcangxin_info:'锁定技。①当你受到伤害时,你观看牌堆底的三张牌并弃置其中任意张牌,若你以此法弃置了红桃牌,则防止此伤害。②摸牌阶段开始时,你展示牌堆底的三张牌,然后摸X张牌(X为其中红桃牌的数量)。',
|
||||
olcangxin_info:'锁定技。①当你每回合第一次受到伤害时,你观看牌堆底的三张牌并弃置其中任意张牌,然后此伤害-X。②摸牌阶段开始时,你展示牌堆底的三张牌,然后摸X张牌(X为其中红桃牌的数量)。',
|
||||
olrunwei:'润微',
|
||||
olrunwei_info:'其他角色的弃牌阶段开始时,若其已受伤,则你可以选择一项:①令其弃置一张牌,其本回合手牌上限+1;②令其摸一张牌,其本回合手牌上限-1。',
|
||||
caoxi:'曹羲',
|
||||
|
@ -27732,7 +27748,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
olxiangxv:'相胥',
|
||||
olxiangxv_info:'当你的手牌数变为全场最少时,你可以获得以下效果:本回合结束时,将手牌数调整至与当前回合角色手牌数相同(至多摸至五张)。',
|
||||
olxiangzuo:'襄胙',
|
||||
olxiangzuo_info:'限定技,当你进入濒死状态时,你可以交给当前回合角色任意张牌,若如此做,若你本回合已对其发动过〖恭节〗或〖相胥〗,你回复等量的体力。',
|
||||
olxiangzuo_info:'限定技,当你进入濒死状态时,你可以交给当前回合角色任意张牌,若如此做,若你本回合已对其发动过〖恭节〗和〖相胥〗,你回复等量的体力。',
|
||||
liyi:'李异',
|
||||
olchanshuang:'缠双',
|
||||
olchanshuang_info:'①出牌阶段限一次,你可以选择一名其他角色。你与其依次选择〖缠双③〗的一项,然后你与其依次执行各自选择的项。②结束阶段,若X大于0,你执行〖缠双③〗的前X项(X为你本回合以任意形式执行过的〖缠双③〗的选项数)。③选项:1.重铸一张牌;2.使用一张【杀】;3.弃置两张牌。',
|
||||
|
|
269
character/sp2.js
269
character/sp2.js
|
@ -136,12 +136,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
order:9,
|
||||
result:{
|
||||
player(player,target){
|
||||
let res=2*get.effect(player,{name:'draw',player,player});
|
||||
if(player!==target) res+=get.effect(player,{name:'losehp'},player,player);
|
||||
return res;
|
||||
},
|
||||
target(player,target){
|
||||
if(player.getHp()+player.countCards('hs',card=>player.canSaveCard(card,player))<=1) return 0;
|
||||
const num=get.sgn(get.attitude(player,target));
|
||||
if(num*get.damageEffect(target,player,player)>0) return num*get.damageEffect(target,player,player);
|
||||
if(target==player) return 0.00001;
|
||||
return 0;
|
||||
return get.damageEffect(target,player,target);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -261,6 +262,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
const num=player.countCards('h');
|
||||
if(player.isMaxHandcard()&&num>0){
|
||||
const maxNum=game.findPlayer(current=>{
|
||||
if(current===player) return false;
|
||||
return !game.hasPlayer(current2=>{
|
||||
if(current2===player) return false;
|
||||
return current2.countCards('h')>current.countCards('h');
|
||||
|
@ -291,7 +293,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
//星袁绍
|
||||
starxiaoyan:{
|
||||
|
@ -716,8 +718,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
create:function(group,player){
|
||||
if(!lib.skill['starcanxi_'+group]){
|
||||
lib.skill['starcanxi_'+group]={
|
||||
const skill='starcanxi_'+group;
|
||||
get.info('starcanxi').createSkill(skill);
|
||||
if(!_status.postReconnect.starcanxi){
|
||||
_status.postReconnect.starcanxi=[get.info('starcanxi').createSkill,[]];
|
||||
}
|
||||
_status.postReconnect.starcanxi[1].add(skill);
|
||||
player.addSkill(skill);
|
||||
},
|
||||
createSkill(skill){
|
||||
if(!lib.skill[skill]) game.broadcastAll(skill=>{
|
||||
const group=skill.slice('starcanxi_'.length);
|
||||
lib.skill[skill]={
|
||||
mark:true,
|
||||
charlotte:true,
|
||||
onremove:function(player){
|
||||
|
@ -725,11 +737,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
intro:{content:'玉玺的一角'},
|
||||
};
|
||||
lib.translate['starcanxi_'+group]='残玺·'+get.translation(group+'2');
|
||||
lib.skill['starcanxi_'+group].marktext=get.translation(group);
|
||||
lib.translate['starcanxi_'+group+'_bg']=get.translation(group);
|
||||
}
|
||||
player.addSkill('starcanxi_'+group);
|
||||
lib.translate[skill]='残玺·'+get.translation(group+'2');
|
||||
lib.skill[skill].marktext=get.translation(group);
|
||||
lib.translate[skill+'_bg']=get.translation(group);
|
||||
},skill);
|
||||
},
|
||||
subSkill:{
|
||||
wangsheng:{
|
||||
|
@ -3272,7 +3283,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else player.addTempSkill('piaoping_blocker');
|
||||
},
|
||||
intro:{name2:'栗',content:'mark'},
|
||||
init(player){
|
||||
player.addMark('tuoxian',1,false);
|
||||
},
|
||||
intro:{name2:'栗',content:'剩余可用#次'},
|
||||
},
|
||||
chuaili:{
|
||||
audio:2,
|
||||
|
@ -3288,8 +3302,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.changeZhuanhuanji('piaoping');
|
||||
}
|
||||
else{
|
||||
player.addMark('tuoxian',1);
|
||||
player.addTempSkill('chuaili_blocker');
|
||||
player.addMark('tuoxian',1,false);
|
||||
if(player.countCards('tuoxian')>3) player.addTempSkill('chuaili_blocker');
|
||||
}
|
||||
game.delayx();
|
||||
},
|
||||
|
@ -4655,26 +4669,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:'xinfu_xingluan',
|
||||
usable:1,
|
||||
trigger:{player:'useCardAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return player.isPhaseUsing();
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var list=['观看牌堆中两张点数为6的牌并获得其中一张'];
|
||||
event.addIndex=1;
|
||||
var bool2=false,bool3=game.hasPlayer(function(current){
|
||||
if(current!=player&¤t.countCards('he')>0) bool2=true;
|
||||
async cost(event, trigger, player){
|
||||
const choiceList = [
|
||||
'观看牌堆中两张点数为6的牌并获得其中一张',
|
||||
'令一名其他角色弃置一张点数为6的牌或交给你一张牌',
|
||||
'获得场上一张点数为6的牌'
|
||||
], choices = ['选项一'];
|
||||
if (game.hasPlayer(current => (current != player && current.countCards('he') > 0))) {
|
||||
choices.push('选项二');
|
||||
}
|
||||
else {
|
||||
choiceList[1] = `<span style="opacity:0.5">${ choiceList[1] }</span>`;
|
||||
}
|
||||
if (game.hasPlayer(current => {
|
||||
return current.hasCard(function(card){
|
||||
return get.number(card)==6&&lib.filter.canBeGained(card,current,player);
|
||||
},'ej');
|
||||
});
|
||||
if(bool2){
|
||||
event.addIndex=0;
|
||||
list.push('令一名其他角色弃置一张点数为6的牌或交给你一张牌');
|
||||
})) {
|
||||
choices.push('选项三');
|
||||
}
|
||||
if(bool3) list.push('获得场上一张点数为6的牌');
|
||||
player.chooseControl('cancel2').set('choiceList',list).set('prompt',get.prompt('xinxingluan')).set('ai',function(){
|
||||
else {
|
||||
choiceList[2] = `<span style="opacity:0.5">${ choiceList[2] }</span>`;
|
||||
}
|
||||
const result = await player.chooseControl(choices, 'cancel2')
|
||||
.set('choiceList',choiceList).set('prompt',get.prompt('xinxingluan'))
|
||||
.set('ai',function(){
|
||||
var player=_status.event.player;
|
||||
if(game.hasPlayer(function(current){
|
||||
if(current==player) return false;
|
||||
|
@ -4682,26 +4704,57 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return current.hasCard(function(card){
|
||||
return get.number(card)==6&&lib.filter.canBeGained(card,current,player)&&get.sgn(get.useful(card,current))==att;
|
||||
},'ej');
|
||||
})) return 2-_status.event.getParent().addIndex;
|
||||
})) return '选项三';
|
||||
if(game.hasPlayer(function(target){
|
||||
if(target==player) return false;
|
||||
var att=get.attitude(player,target);
|
||||
return att<0&&target.countCards('he')>0&&!target.hasCard(function(card){
|
||||
return get.value(card,target)<=0;
|
||||
},'he');
|
||||
})) return 1;
|
||||
return 0;
|
||||
});
|
||||
'step 1'
|
||||
if(result.control!='cancel2'){
|
||||
if(result.index==0){
|
||||
player.logSkill('xinxingluan');
|
||||
})) return '选项二';
|
||||
return '选项一';
|
||||
}).forResult();
|
||||
if (result.control !== 'cancel2') {
|
||||
const results = {bool: true, cost_data: {index: choices.indexOf(result.control)}};
|
||||
if(results.cost_data.index === 1) {
|
||||
const {targets} = await player.chooseTarget('令一名其他角色弃置一张点数为6的牌,否则交给你一张牌',true,function(card,player,current){
|
||||
return current!=player&¤t.countCards('he')>0;
|
||||
}).set('ai',function(target){
|
||||
var player=_status.event.player,att=get.attitude(player,target);
|
||||
if(att>=0) return 0;
|
||||
if(!target.hasCard(function(card){
|
||||
return get.value(card,target)<=0;
|
||||
},'he')) return -att/Math.sqrt(target.countCards('he'));
|
||||
return 0;
|
||||
}).forResult();
|
||||
results.targets = targets;
|
||||
}
|
||||
else if(result.index+event.addIndex==1) event.goto(6);
|
||||
else event.goto(4);
|
||||
else if(results.cost_data.index === 2){
|
||||
const {targets} = await player.chooseTarget('获得一名角色装备区或判定区内点数为6的牌',true,function(card,player,current){
|
||||
return current.hasCard(function(card){
|
||||
return get.number(card)==6&&lib.filter.canBeGained(card,current,player);
|
||||
},'ej');
|
||||
}).set('ai',function(target){
|
||||
var player=_status.event.player,att=-get.sgn(get.attitude(player,target)-0.1),max=0,ej=target.getCards('ej',function(card){
|
||||
return get.number(card)==6&&lib.filter.canBeGained(card,target,player);
|
||||
});
|
||||
for(var i of ej){
|
||||
var num=get.useful(i,target)*att;
|
||||
if(num>max) max=num;
|
||||
return max;
|
||||
}
|
||||
}).forResult();
|
||||
results.targets = targets;
|
||||
}
|
||||
event.result = results;
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var result = event.cost_data;
|
||||
if(result.index === 1) event.goto(4);
|
||||
else if(result.index === 2) event.goto(3);
|
||||
'step 1'
|
||||
var cards=[];
|
||||
while(cards.length<2){
|
||||
var card=get.cardPile2(function(card){
|
||||
|
@ -4720,62 +4773,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else player.chooseButton(['兴乱:选择获得其中一张',cards],true).set('ai',function(button){
|
||||
return get.value(button.link,_status.event.player);
|
||||
});
|
||||
'step 3'
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
player.gain(result.links,'gain2');
|
||||
}
|
||||
event.finish();
|
||||
'step 4'
|
||||
player.chooseTarget('获得一名角色装备区或判定区内点数为6的牌',true,function(card,player,current){
|
||||
return current.hasCard(function(card){
|
||||
return get.number(card)==6&&lib.filter.canBeGained(card,current,player);
|
||||
},'ej');
|
||||
}).set('ai',function(target){
|
||||
var player=_status.event.player,att=-get.sgn(get.attitude(player,target)-0.1),max=0,ej=target.getCards('ej',function(card){
|
||||
return get.number(card)==6&&lib.filter.canBeGained(card,target,player);
|
||||
});
|
||||
for(var i of ej){
|
||||
var num=get.useful(i,target)*att;
|
||||
if(num>max) max=num;
|
||||
return max;
|
||||
}
|
||||
'step 3'
|
||||
var target=targets[0];
|
||||
player.gainPlayerCard(target,'ej',true).set('filterButton',function(button){
|
||||
return get.number(button.link)==6;
|
||||
});
|
||||
'step 5'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.logSkill('xinxingluan',target);
|
||||
player.gainPlayerCard(target,'ej',true).set('filterButton',function(button){
|
||||
return get.number(button.link)==6;
|
||||
});
|
||||
}
|
||||
event.finish();
|
||||
'step 6'
|
||||
if(!game.hasPlayer(current=>current!=player)) event.finish();
|
||||
else player.chooseTarget('令一名其他角色弃置一张点数为6的牌,否则交给你一张牌',true,function(card,player,current){
|
||||
return current!=player&¤t.countCards('he')>0;
|
||||
}).set('ai',function(target){
|
||||
var player=_status.event.player,att=get.attitude(player,target);
|
||||
if(att>=0) return 0;
|
||||
if(!target.hasCard(function(card){
|
||||
return get.value(card,target)<=0;
|
||||
},'he')) return -att/Math.sqrt(target.countCards('he'));
|
||||
return 0;
|
||||
});
|
||||
'step 7'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
event.target=target;
|
||||
player.logSkill('xinxingluan',target);
|
||||
target.chooseToDiscard('he','弃置一张点数为6的牌,否则交给'+get.translation(player)+'一张牌',function(card){
|
||||
return get.number(card)==6;
|
||||
}).ai=(card)=>(8-get.value(card));
|
||||
}
|
||||
'step 8'
|
||||
'step 4'
|
||||
var target=targets[0];
|
||||
event.target=target;
|
||||
target.chooseToDiscard('he','弃置一张点数为6的牌,否则交给'+get.translation(player)+'一张牌',function(card){
|
||||
return get.number(card)==6;
|
||||
}).ai=(card)=>(8-get.value(card));
|
||||
'step 5'
|
||||
if(!result.bool){
|
||||
target.chooseCard('he',true,'交给'+get.translation(player)+'一张牌');
|
||||
}
|
||||
else event.finish();
|
||||
'step 9'
|
||||
'step 6'
|
||||
if(result.bool) target.give(result.cards,player,'giveAuto');
|
||||
},
|
||||
},
|
||||
|
@ -6599,16 +6619,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
direct:true,
|
||||
filter:function(event,player){
|
||||
if(!game.hasPlayer(function(current){
|
||||
return current.hasSkill('cixiao_yizi');
|
||||
return current.hasSkill('panshi');
|
||||
})) return true;
|
||||
return player.countCards('he')>=1&&game.hasPlayer(function(current){
|
||||
return current!=player&&!current.hasSkill('cixiao_yizi');
|
||||
return current!=player&&!current.hasSkill('panshi');
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(game.hasPlayer(function(current){
|
||||
return current.hasSkill('cixiao_yizi');
|
||||
return current.hasSkill('panshi');
|
||||
})) event.goto(2);
|
||||
else player.chooseTarget(lib.filter.notMe,get.prompt('cixiao'),'令一名其他角色获得「义子」标记').set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
|
@ -6619,19 +6639,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.logSkill('cixiao',target);
|
||||
target.addSkills('cixiao_yizi');
|
||||
target.addSkills('panshi');
|
||||
}
|
||||
event.finish();
|
||||
'step 2'
|
||||
var list=game.filterPlayer(function(current){
|
||||
return current.hasSkill('cixiao_yizi');
|
||||
return current.hasSkill('panshi');
|
||||
});
|
||||
player.chooseCardTarget({
|
||||
prompt:get.prompt('cixiao'),
|
||||
prompt2:('弃置一张牌并将'+get.translation(list)+'的「义子」标记转移给其他角色'),
|
||||
position:'he',
|
||||
filterTarget:function(card,player,target){
|
||||
return player!=target&&!target.hasSkill('cixiao_yizi');
|
||||
return player!=target&&!target.hasSkill('panshi');
|
||||
},
|
||||
filterCard:lib.filter.cardDiscardable,
|
||||
ai1:function(card){
|
||||
|
@ -6654,12 +6674,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.logSkill('cixiao');
|
||||
player.discard(result.cards).delay=false;
|
||||
player.line2(game.filterPlayer(function(current){
|
||||
if(current.hasSkill('cixiao_yizi')){
|
||||
current.removeSkills('cixiao_yizi');
|
||||
if(current.hasSkill('panshi')){
|
||||
current.removeSkills('panshi');
|
||||
return true;
|
||||
}
|
||||
}).concat(result.targets),'green');
|
||||
target.addSkills('cixiao_yizi');
|
||||
target.addSkills('panshi');
|
||||
}
|
||||
else event.finish();
|
||||
'step 4'
|
||||
|
@ -6667,18 +6687,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
derivation:'panshi',
|
||||
ai:{threaten:8},
|
||||
subSkill: {
|
||||
yizi: {
|
||||
mark: true,
|
||||
charlotte: true,
|
||||
marktext: '子',
|
||||
intro: {
|
||||
name: '义子',
|
||||
content: '具有〖叛弑〗'
|
||||
},
|
||||
group: 'panshi'
|
||||
}
|
||||
}
|
||||
},
|
||||
panshi:{
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
|
@ -6714,6 +6722,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.give(result.cards,target);
|
||||
}
|
||||
},
|
||||
mark:true,
|
||||
marktext:'子',
|
||||
intro:{
|
||||
name:'义子',
|
||||
//content:'我是儿子',
|
||||
//R·I·P——永远怀念:被棘手砍掉的“我是儿子”
|
||||
content(_,player){
|
||||
const targets=game.filterPlayer2(target=>target.hasSkill('cixiao',null,null,false)).sortBySeat(player);
|
||||
if(!targets.length) return '我义父呢?!';
|
||||
if(['name','name1','name2'].some(name=>{
|
||||
if(!player[name]||!get.character(player[name])||typeof get.translation(player[name])!='string') return false;
|
||||
return player[name].includes('lvbu')&&get.translation(player[name]).includes('吕布');
|
||||
})) return '公若不弃,布愿拜为义父';
|
||||
return '我是'+get.translation(targets)+'的'+((player)=>{
|
||||
switch(player.sex){
|
||||
case 'female':
|
||||
return '义女';
|
||||
case 'double':
|
||||
return '义子义女';
|
||||
default:
|
||||
return '义子';
|
||||
}
|
||||
})(player);
|
||||
},
|
||||
},
|
||||
group:'panshi_damage',
|
||||
},
|
||||
panshi_damage:{
|
||||
|
@ -6725,6 +6758,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
trigger.num++;
|
||||
if(['name','name1','name2'].some(name=>{
|
||||
if(!player[name]||!get.character(player[name])||typeof get.translation(player[name])!='string') return false;
|
||||
return player[name].includes('lvbu')&&get.translation(player[name]).includes('吕布');
|
||||
})) player.chat('吾堂堂丈夫,安肯为汝子乎!');
|
||||
var evt=event.getParent('phaseUse');
|
||||
if(evt&&evt.player==player) evt.skipped=true;
|
||||
},
|
||||
|
@ -11026,9 +11063,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return '转换技,锁定技。当你使用一张牌时,<span class="bluetext">阴:你摸X张牌。</span>阳:你弃置X张牌。(X为你本阶段内发动过〖漂萍〗的次数且至多等于你的体力值)';
|
||||
},
|
||||
chuaili:function(player){
|
||||
if(!player.hasSkill('piaoping',null,null,false)) return '锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:处于阳状态,则你将〖漂萍〗转换至阴状态;处于阴状态,则你获得一枚“栗”,且令〖惴栗〗于本回合内失效。';
|
||||
if(player.storage.piaoping) return '锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:<span class="bluetext">处于阳状态,则你将〖漂萍〗转换至阴状态;</span>处于阴状态,则你获得一枚“栗”,且令〖惴栗〗于本回合内失效。';
|
||||
return '锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:处于阳状态,则你将〖漂萍〗转换至阴状态;<span class="bluetext">处于阴状态,则你获得一枚“栗”,且令〖惴栗〗于本回合内失效。</span>';
|
||||
if(!player.hasSkill('piaoping',null,null,false)) return '锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:处于阳状态,则你将〖漂萍〗转换至阴状态;处于阴状态,则你令〖托献〗发动次数+1,然后若〖托献〗发动次数大于3,则〖惴栗〗于本回合内失效。';
|
||||
if(player.storage.piaoping) return '锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:<span class="bluetext">处于阳状态,则你将〖漂萍〗转换至阴状态;</span>处于阴状态,则你令〖托献〗发动次数+1,然后若〖托献〗发动次数大于3,则〖惴栗〗于本回合内失效。';
|
||||
return '锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:处于阳状态,则你将〖漂萍〗转换至阴状态;<span class="bluetext">处于阴状态,则你令〖托献〗发动次数+1,然后若〖托献〗发动次数大于3,则〖惴栗〗于本回合内失效。</span>';
|
||||
},
|
||||
dcdouzhen:function(player){
|
||||
var str='锁定技。①转换技。你的回合内,';
|
||||
|
@ -11388,7 +11425,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
recuorui:'摧锐',
|
||||
recuorui_info:'限定技,出牌阶段,你可以依次获得至多X名角色的各一张手牌(X为你的体力值)。',
|
||||
reliewei:'裂围',
|
||||
reliewei_info:'每回合限Y次,当有角色于你的回合内进入濒死状态时,你可以摸一张牌(Y为你的体力值,若当前回合角色为你,则Y为Infinity)。',
|
||||
reliewei_info:'每回合限Y次,当有角色进入濒死状态时,你可以摸一张牌(Y为你的体力值,若当前回合角色为你,则Y为Infinity)。',
|
||||
duanwei:'段煨',
|
||||
langmie:'狼灭',
|
||||
langmie_damage:'狼灭',
|
||||
|
@ -11484,7 +11521,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
quanjiu_info:'锁定技。①你手牌区中的【酒】的牌名视为【杀】。②你使用对应的实体牌为一张【酒】的非转化【杀】不计入次数限制。',
|
||||
re_pangdegong:'庞德公',
|
||||
heqia:'和洽',
|
||||
heqia_info:'出牌阶段开始时,你可选择一项:①将任意张牌交给一名其他角色。②令一名有手牌的其他角色交给你任意张牌。然后以此法得到牌的角色可以视为使用一张基本牌,且当其声明使用此牌后,可以为此牌增加至至多X个目标(X为以此法移动的牌数)。',
|
||||
heqia_info:'出牌阶段开始时,你可选择一项:①将任意张牌交给一名其他角色。②令一名有手牌的其他角色交给你任意张牌。然后以此法得到牌的角色可以将一张手牌当作任意基本牌使用,且当其声明使用此牌后,可以为此牌增加至至多X个目标(X为以此法移动的牌数)。',
|
||||
yinyi:'隐逸',
|
||||
yinyi_info:'锁定技。每回合限一次,当你受到非属性伤害时,若你的手牌数和体力值与伤害来源均不相同,则你防止此伤害。',
|
||||
haomeng:'郝萌',
|
||||
|
@ -11492,7 +11529,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xiongmang_info:'你可将任意张花色各不相同的手牌当做目标数上限为X的【杀】使用(X为此【杀】对应的实体牌数)。此【杀】使用结算结束后,若你未造成过渠道为此牌的伤害,则你减1点体力上限。',
|
||||
yanfuren:'严夫人',
|
||||
channi:'谗逆',
|
||||
channi_info:'出牌阶段限一次。你可将任意张手牌交给一名其他角色,然后其可以将等量的手牌当做【决斗】使用。若其因此【决斗】造成了伤害,则其摸X张牌(X为此【决斗】对应的实体牌数)。若其因此【决斗】受到过伤害,则你弃置所有手牌。',
|
||||
channi_info:'出牌阶段限一次。你可将任意张手牌交给一名其他角色,然后其可以将至多等量的手牌当做【决斗】使用。若其因此【决斗】造成了伤害,则其摸X张牌(X为此【决斗】对应的实体牌数)。若其因此【决斗】受到过伤害,则你弃置所有手牌。',
|
||||
nifu:'匿伏',
|
||||
nifu_info:'锁定技。一名角色的回合结束时,你将手牌摸至或弃置至三张。',
|
||||
licaiwei:'李采薇',
|
||||
|
@ -11512,9 +11549,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
piaoping:'漂萍',
|
||||
piaoping_info:'转换技,锁定技。当你使用一张牌时,阴:你摸X张牌。阳:你弃置X张牌。(X为你本阶段内发动过〖漂萍〗的次数且至多等于你的体力值)',
|
||||
tuoxian:'托献',
|
||||
tuoxian_info:'当你因执行〖漂萍〗的效果而弃置牌后,你可以弃置一枚“栗”并令一名其他角色获得这些牌,然后令该角色选择一项:⒈弃置区域内等量的牌。⒉令你的〖漂萍〗失效直到回合结束。',
|
||||
tuoxian_info:'每局游戏限一次。当你因执行〖漂萍〗的效果而弃置牌后,你可令一名其他角色获得这些牌,然后令该角色选择一项:⒈弃置区域内等量的牌。⒉令你的〖漂萍〗失效直到回合结束。',
|
||||
chuaili:'惴栗',
|
||||
chuaili_info:'锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:处于阳状态,则你将〖漂萍〗转换至阴状态;处于阴状态,则你获得一枚“栗”,且令〖惴栗〗于本回合内失效。',
|
||||
chuaili_info:'锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:处于阳状态,则你将〖漂萍〗转换至阴状态;处于阴状态,则你令〖托献〗发动次数+1,然后若〖托献〗发动次数大于3,则〖惴栗〗于本回合内失效。',
|
||||
fengfang:'冯方',
|
||||
dcditing:'谛听',
|
||||
dcditing_info:'其他角色的出牌阶段开始时,若你在该角色的攻击范围内,则你可以观看其的X张手牌(X为你的体力值)并选择其中一张,且获得如下效果:①当其使用对应实体牌包含此牌的牌指定你为目标后,你令此牌对你无效。②当其使用对应实体牌包含此牌的牌结算结束后,若你不是此牌的目标,则你摸两张牌。③其出牌阶段结束时,若此牌位于其的手牌区,则你获得此牌。',
|
||||
|
|
|
@ -693,32 +693,47 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
twxiayong:{
|
||||
audio:2,
|
||||
audioname:['tw_yanliang'],
|
||||
trigger:{global:'damageBegin1'},
|
||||
filter(event,player){
|
||||
if(event.getParent().type!='card'||event.card.name!='juedou'||!event.player.isIn()) return false;
|
||||
const evt=game.getGlobalHistory('useCard',evt=>evt.card==event.card)[0];
|
||||
if(evt&&evt.targets&&(event.player!=player||player.countCards('h'))){
|
||||
if(evt.player==player){
|
||||
return evt.targets.includes(event.player)&&event.player!=player;
|
||||
}
|
||||
return evt.targets.includes(player)&&evt.player!=player;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
forced:true,
|
||||
logTarget:'player',
|
||||
async content(event,trigger,player){
|
||||
if(trigger.player===player){
|
||||
const cards=player.getCards('h',card=>{
|
||||
return lib.filter.cardDiscardable(card,player,'twxiayong');
|
||||
});
|
||||
if(cards.length>0) player.discard(cards.randomGet());
|
||||
}
|
||||
else{
|
||||
trigger.increase('num');
|
||||
}
|
||||
locked:true,
|
||||
group:'twxiayong_effect',
|
||||
subSkill:{
|
||||
effect:{
|
||||
trigger:{global:'damageBegin1'},
|
||||
filter(event,player){
|
||||
if(event.getParent().type!='card'||event.card.name!='juedou'||!event.player.isIn()) return false;
|
||||
const evt=game.getGlobalHistory('useCard',evt=>evt.card==event.card)[0];
|
||||
if(evt&&evt.targets&&(event.player!=player||player.countCards('h'))){
|
||||
if(evt.player==player){
|
||||
return evt.targets.includes(event.player)&&event.player!=player;
|
||||
}
|
||||
return evt.targets.includes(player)&&evt.player!=player;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
async content(event,trigger,player){
|
||||
player.logSkill('twxiayong'+(trigger.player===player?'1':'2'),trigger.player);
|
||||
if(trigger.player===player){
|
||||
const cards=player.getCards('h',card=>{
|
||||
return lib.filter.cardDiscardable(card,player,'twxiayong');
|
||||
});
|
||||
if(cards.length>0) player.discard(cards.randomGet());
|
||||
}
|
||||
else{
|
||||
trigger.increase('num');
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
twxiayong1:{
|
||||
audio:true,
|
||||
audioname:['tw_yanliang'],
|
||||
sourceSkill:'twxiayong',
|
||||
},
|
||||
twxiayong2:{
|
||||
inherit:'twxiayong1',
|
||||
},
|
||||
//袁谭
|
||||
twqiaosi:{
|
||||
audio:2,
|
||||
|
@ -1374,7 +1389,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
const {result:{bool,links}}=await player.chooseButton([
|
||||
'劫囚:请选择你要恢复的装备栏',
|
||||
[transList,'tdnodes'],
|
||||
],num,true).set('map',map)
|
||||
],Math.min(transList.length,num),true).set('map',map)
|
||||
.set('ai',button=>['equip5','equip4','equip1','equip3','equip2'].indexOf(get.event('map')[button.link])+2);
|
||||
if(bool) await player.enableEquip(links.slice().map(i=>map[i]));
|
||||
},
|
||||
|
@ -10594,6 +10609,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
card:trigger.card,
|
||||
})) damageNum=1;
|
||||
var yimie=function(){
|
||||
if(damageNum==1) return false;
|
||||
var hit=true;
|
||||
if(get.type(trigger.card)=='trick'&&trigger.player.countCards('hs',{name:'wuxie'})) hit=false;
|
||||
if(trigger.card.name=='huogong'&&trigger.player.countCards('h',function(card){
|
||||
|
|
|
@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
name:'xianding',
|
||||
connect:true,
|
||||
character:{
|
||||
caofang:['male','wei',4,['dczhimin','dcjujian'],['zhu']],
|
||||
dc_sb_simayi:['male','wei',3,['dcsbquanmou','dcsbpingliao']],
|
||||
chendong:['male','wu',4,['dcduanxie','fenming']],
|
||||
lvfan:['male','wu',3,['diaodu','diancai']],
|
||||
|
@ -103,7 +104,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp2_huben:['chendong','wangshuang','wenyang','re_liuzan','dc_huangzu','wulan','leitong','chentai','dc_duyu','dc_wangjun','dc_xiahouba','old_huangfusong','huzun'],
|
||||
sp2_shengun:["puyuan","guanlu","gexuan",'wufan','re_zhangbao','dukui','zhaozhi','zhujianping','dc_zhouxuān','zerong'],
|
||||
sp2_bizhe:['dc_luotong','dc_wangchang','chengbing','dc_yangbiao','ruanji','cuimao'],
|
||||
sp2_huangjia:['caomao','liubian','dc_liuyu','quanhuijie','dingshangwan','yuanji','xielingyu','sunyu','ganfurenmifuren','dc_ganfuren','dc_mifuren','dc_shixie'],
|
||||
sp2_huangjia:['caomao','liubian','dc_liuyu','quanhuijie','dingshangwan','yuanji','xielingyu','sunyu','ganfurenmifuren','dc_ganfuren','dc_mifuren','dc_shixie','caofang'],
|
||||
sp2_zhangtai:['guozhao','fanyufeng','ruanyu','yangwan','re_panshu'],
|
||||
sp2_jinse:['caojinyu','re_sunyi','re_fengfangnv','caohua','laiyinger','zhangfen','zhugeruoxue','caoxian','dc_qinghegongzhu','zhugemengxue'],
|
||||
sp2_yinyu:['zhouyi','luyi','sunlingluan','caoyi'],
|
||||
|
@ -122,6 +123,143 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
],
|
||||
},
|
||||
skill:{
|
||||
//曹芳
|
||||
dczhimin:{
|
||||
audio:2,
|
||||
trigger:{global:'roundStart'},
|
||||
filter(event,player){
|
||||
return game.hasPlayer(current=>current!=player&¤t.countCards('h'))&&player.getHp()>0;
|
||||
},
|
||||
forced:true,
|
||||
group:['dczhimin_mark','dczhimin_draw'],
|
||||
async content(event,trigger,player){
|
||||
const targets = await player.chooseTarget(`置民:请选择至多${get.cnNumber(player.getHp())}名其他角色`, '你获得这些角色各自手牌中的随机一张点数最小的牌', (card, player, target) => {
|
||||
return target !== player && target.countCards('h');
|
||||
}, [1, player.getHp()], true).set('ai', target => {
|
||||
const player = get.player();
|
||||
return get.effect(target, {name:'shunshou_copy', position: 'h'}, player, player) + 0.1;
|
||||
}).forResultTargets();
|
||||
if (!targets || !targets.length) return;
|
||||
targets.sortBySeat(trigger.player);
|
||||
player.line(targets, 'thunder');
|
||||
const toGain = [];
|
||||
for (const target of targets) {
|
||||
const cards = target.getCards('h'), minNumber = cards.map(card => get.number(card)).sort((a, b) => a - b)[0];
|
||||
const gainableCards = cards.filter(card => {
|
||||
return get.number(card) === minNumber && lib.filter.canBeGained(card, player, target);
|
||||
}).randomSort();
|
||||
toGain.push(gainableCards[0]);
|
||||
}
|
||||
if (toGain.length) await player.gain(toGain, 'giveAuto');
|
||||
await game.asyncDelayx();
|
||||
},
|
||||
ai:{
|
||||
threaten:5.8,
|
||||
},
|
||||
mod:{
|
||||
aiOrder(player,card,num){
|
||||
if(num>0&&get.itemtype(card)==='card'&&card.hasGaintag('dczhimin_tag')&&player.countCards('h',cardx=>{
|
||||
return cardx.hasGaintag('dczhimin_tag')&&cardx!==card;
|
||||
})<player.maxHp) return num/10;
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
mark:{
|
||||
audio:'dczhimin',
|
||||
trigger:{
|
||||
player:'gainAfter',
|
||||
global:'loseAsyncAfter',
|
||||
},
|
||||
forced:true,
|
||||
filter(event,player){
|
||||
if(_status.currentPhase===player||!event.getg(player).some(card=>get.position(card)==='h'&&get.owner(card)===player)) return false;
|
||||
return true;
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
player.addGaintag(trigger.getg(player).filter(card=>get.position(card)==='h'&&get.owner(card)===player), 'dczhimin_tag');
|
||||
},
|
||||
},
|
||||
draw:{
|
||||
audio:'dczhimin',
|
||||
trigger:{
|
||||
player:'loseAfter',
|
||||
global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'],
|
||||
},
|
||||
forced:true,
|
||||
filter(event,player){
|
||||
const evt=event.getl(player);
|
||||
if(!evt.hs.length) return false;
|
||||
return Object.values(evt.gaintag_map).flat().includes('dczhimin_tag');
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
const count = player.maxHp - player.countCards('h');
|
||||
if (count <= 0) return;
|
||||
await player.draw(count);
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
dcjujian:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
zhuSkill:true,
|
||||
filter(event,player){
|
||||
return game.hasPlayer(current=>{
|
||||
return player.hasZhuSkill('dcjujian',current)&¤t.group==='wei'&¤t!==player;
|
||||
});
|
||||
},
|
||||
filterTarget(_,player,target){
|
||||
return player.hasZhuSkill('dcjujian',target)&&target.group==='wei'&&target!==player;
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
const target = event.targets[0];
|
||||
await target.draw();
|
||||
target.addTempSkill('dcjujian_forbid', 'roundStart');
|
||||
target.markAuto('dcjujian_forbid', player);
|
||||
},
|
||||
ai:{
|
||||
result:{
|
||||
target(player,target){
|
||||
const num=target.countCards('hs',card=>{
|
||||
return get.type(card)=='trick'&&target.canUse(card,player)&&get.effect(player,card,target,player)<-2;
|
||||
}),att=get.attitude(player,target);
|
||||
if(att<0) return -0.74*num;
|
||||
return 1.5;
|
||||
},
|
||||
},
|
||||
},
|
||||
subSkill:{
|
||||
forbid:{
|
||||
audio:'dcjujian',
|
||||
trigger:{
|
||||
player:'useCardToBefore',
|
||||
},
|
||||
filter(event,player){
|
||||
if(get.type(event.card)!=='trick') return false;
|
||||
return player.getStorage('dcjujian_forbid').includes(event.target);
|
||||
},
|
||||
forced:true,
|
||||
charlotte:true,
|
||||
onremove:true,
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
await trigger.target.logSkill('dcjujian_forbid', player);
|
||||
trigger.cancel();
|
||||
},
|
||||
intro:{
|
||||
content:'使用普通锦囊牌对$无效',
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
player(card,player,target,current){
|
||||
if(get.type(card)=='trick'&&player.getStorage('dcjujian_forbid').includes(target)) return 'zeroplayertarget';
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
//谋司马懿
|
||||
dcsbquanmou:{
|
||||
audio:2,
|
||||
|
@ -1282,14 +1420,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
zhuanhuanji:true,
|
||||
intro:{
|
||||
content:function(storage){
|
||||
if(!storage) return '每回合限一次,当你得到其他角色的牌后,或其他角色得到你的牌后,你可以令该角色使用至多X张【杀】,且其每以此法造成1点伤害,其回复1点体力。(X为你的体力值)'
|
||||
return '每回合限一次,当你得到其他角色的牌后,或其他角色得到你的牌后,你可令该角色打出至多X张【杀】,然后其失去Y点体力。(X为你的体力值,Y为X-其打出【杀】数)';
|
||||
if(!storage) return '每回合限一次,当你得到其他角色的牌后,或其他角色得到你的牌后,你可以令该角色使用至多X张【杀】,且其每以此法造成1点伤害,其回复1点体力。(X为你的体力上限)';
|
||||
return '每回合限一次,当你得到其他角色的牌后,或其他角色得到你的牌后,你可令该角色打出至多X张【杀】,然后其失去Y点体力。(X为你的体力上限,Y为X-其打出【杀】数)';
|
||||
},
|
||||
},
|
||||
audio:2,
|
||||
trigger:{global:['gainAfter','loseAsyncAfter']},
|
||||
filter:function(event,player){
|
||||
if(!player.getHp()) return false;
|
||||
if(typeof player.maxHp!='number'||player.maxHp<=0) return false;
|
||||
if(event.name=='loseAsync'&&event.type!='gain') return false;
|
||||
if(player.hasSkill('dcsbmengmou_true')&&player.hasSkill('dcsbmengmou_false')) return false;
|
||||
var cards1=event.getl(player).cards2,cards2=event.getg(player);
|
||||
|
@ -1308,7 +1446,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var player=map.player,trigger=map.trigger;
|
||||
var storage=player.storage.dcsbmengmou;
|
||||
player.addTempSkill('dcsbmengmou_effect','dcsbmengmouAfter');
|
||||
var targets=[],num=player.getHp();
|
||||
var targets=[],num=player.maxHp;
|
||||
var cards1=trigger.getl(player).cards2;
|
||||
var cards2=trigger.getg(player);
|
||||
targets.addArray(game.filterPlayer(function(current){
|
||||
|
@ -1396,7 +1534,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
charlotte:true,
|
||||
trigger:{global:'damageSource'},
|
||||
filter:function(event,player){
|
||||
if(event.getParent().type!='card') return false;
|
||||
if(!event.source||event.getParent().type!='card') return false;
|
||||
if(event.source.isHealthy()||event.card.name!='sha') return false;
|
||||
return event.getParent(4).name=='dcsbmengmou'&&event.getParent(4).player==player;
|
||||
},
|
||||
|
@ -1525,14 +1663,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
trigger:{player:'phaseJieshuBegin'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return game.hasPlayer(current=>current.countCards('e'));
|
||||
},
|
||||
content:function*(event,map){
|
||||
const player=map.player;
|
||||
let result=yield player.chooseTarget(get.prompt('dcnuanhui'),'选择一名装备区有牌的角色,该角色可以依次使用X张基本牌(X为其装备区牌数)。',(card,player,target)=>{
|
||||
return target.countCards('e');
|
||||
}).set('ai',target=>{
|
||||
let result=yield player.chooseTarget(get.prompt('dcnuanhui'),'选择一名装备区有牌的角色,该角色可以依次使用X张基本牌(X为其装备区牌数且至少为1)').set('ai',target=>{
|
||||
return get.event('aiTarget')==target?10:0;
|
||||
}).set('aiTarget',(()=>{
|
||||
const player=get.player();
|
||||
|
@ -1544,7 +1677,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(get.attitude(player,target)<=0) return -1;
|
||||
const toUse=[];
|
||||
const hp=target.hp;
|
||||
let eff=0,count=target.countCards('e');
|
||||
let eff=0,count=Math.max(1,target.countCards('e'));
|
||||
while(count--){
|
||||
target.hp=Math.min(target.maxHp,target.hp+toUse.filter(card=>card.name=='tao').length);
|
||||
const listx=list.map(info=>{
|
||||
|
@ -1570,11 +1703,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return eff;
|
||||
}
|
||||
const playerList=game.filterPlayer(current=>{
|
||||
return current.countCards('e');
|
||||
}).map(current=>[current,getUseValue(current)]).sort((a,b)=>{
|
||||
return b[1]-a[1];
|
||||
});
|
||||
const playerList=game.filterPlayer().map(current=>[current,getUseValue(current)]).sort((a,b)=>b[1]-a[1]);
|
||||
if(playerList[0][1]<=0) return null;
|
||||
return playerList[0][0];
|
||||
})());
|
||||
|
@ -1582,8 +1711,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
const target=result.targets[0];
|
||||
player.logSkill('dcnuanhui',target);
|
||||
if(!target.isUnderControl(true)&&!target.isOnline()) game.delayx();
|
||||
const total=target.countCards('e');
|
||||
let count=0,forced=false;
|
||||
const total=Math.max(1,target.countCards('e'));
|
||||
let count=0,forced=false,used=[],discard=false;
|
||||
while(count<total){
|
||||
const basicList=get.inpileVCardList(info=>{
|
||||
return info[0]=='basic'&&target.hasUseTarget({name:info[2],nature:info[3],isCard:true});
|
||||
|
@ -1593,7 +1722,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
break;
|
||||
}
|
||||
const str=forced?'视为使用一张基本牌':'是否视为使用一张基本牌?';
|
||||
result=yield target.chooseButton([str,[basicList,'vcard']],forced).set('ai',button=>{
|
||||
const result=yield target.chooseButton([str,[basicList,'vcard']],forced).set('ai',button=>{
|
||||
return get.player().getUseValue({name:button.link[2],nature:button.link[3],isCard:true});
|
||||
});
|
||||
if(!result.bool){
|
||||
|
@ -1602,10 +1731,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
forced=true;
|
||||
const card=new lib.element.VCard({name:result.links[0][2],nature:result.links[0][3],isCard:true});
|
||||
yield target.chooseUseTarget(card,true,false);
|
||||
const result2=yield target.chooseUseTarget(card,true,false);
|
||||
if(!discard&&result2.bool){
|
||||
if(used.includes(result.links[0][2])) discard=true;
|
||||
else used.add(result.links[0][2]);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
if(count>1){
|
||||
if(discard){
|
||||
const cards=target.getCards('e',card=>{
|
||||
return lib.filter.cardDiscardable(card,target,'dcnuanhui');
|
||||
});
|
||||
|
@ -2495,7 +2628,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(same.length){
|
||||
for(var suit of suits){
|
||||
if(same.some(card=>get.suit(card,false)==suit)){
|
||||
list.push([get.type(name),get.translation(suit),name,undefined,suit]);
|
||||
list.push([suit,'',name,undefined,suit]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2504,7 +2637,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(same.length){
|
||||
for(var suit of suits){
|
||||
if(same.some(card=>get.suit(card,false)==suit)){
|
||||
list.push([get.type(name),get.translation(suit),name,nature,suit]);
|
||||
list.push([suit,'',name,nature,suit]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3129,7 +3262,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
if(target.hasMark('dcchangqu_warshipx')){
|
||||
var prompt2='是否交给'+get.translation(player)+get.cnNumber(num)+'张手牌?'+(nextPlayer?'若如此做,将“战舰”移动给'+get.translation(nextPlayer)+',':',')+'否则你下次受到的属性伤害值+'+num;
|
||||
target.chooseCard(get.translation(player)+'对你发动了【长驱】',prompt2).set('ai',card=>{
|
||||
target.chooseCard(get.translation(player)+'对你发动了【长驱】',prompt2,num).set('ai',card=>{
|
||||
if(_status.event.att>0) return 15-get.value(card);
|
||||
if(_status.event.take) return 0;
|
||||
return 8.2-0.8*Math.min(5,_status.event.target.hp+_status.event.target.hujia)-get.value(card);
|
||||
|
@ -3770,7 +3903,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
rec:{
|
||||
audio:'guixiu',
|
||||
trigger:{
|
||||
player:'logSkill',
|
||||
player:'useSkillAfter',
|
||||
},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
|
@ -7968,8 +8101,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
getZhuanhuanji:function(player,bool){
|
||||
var skills=player.getSkills(null,false,false).filter(function(i){
|
||||
const list=get.skillCategoriesOf(i);
|
||||
return !list.includes('Charlotte')&&list.includes('转换技');
|
||||
return get.is.zhuanhuanji(i,player);
|
||||
});
|
||||
if(!bool) return skills;
|
||||
if(!skills.length) return 'none';
|
||||
|
@ -7981,7 +8113,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
getState:function(player,skill){
|
||||
var info=get.info(skill),zhuanhuan=info.zhuanhuanji;
|
||||
if(zhuanhuan=='number') return (player.countMark(skill)%2==1);
|
||||
if(zhuanhuan&&zhuanhuan=='number') return (player.countMark(skill)%2==1);
|
||||
return Boolean(player.storage[skill]);
|
||||
},
|
||||
trigger:{
|
||||
|
@ -9535,7 +9667,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(changed2.includes(from.link)) return true;
|
||||
return changed.includes(to.link);
|
||||
});
|
||||
next.set('max',Math.min(hs.length,ts.length,player.getDamagedHp()));
|
||||
next.set('processAI',function(list){
|
||||
if(_status.event.max){
|
||||
let gain=list[0][1].sort((a,b)=>{
|
||||
return player.getUseValue(b,null,true)-player.getUseValue(a,null,true);
|
||||
}).slice(0,_status.event.max),give=list[1][1].sort((a,b)=>{
|
||||
return get.value(a,player)-get.value(b,player);
|
||||
}).slice(0,_status.event.max);
|
||||
for(let i of gain){
|
||||
if(get.value(i,player)<get.value(give[0],player)) continue;
|
||||
let j=give.shift();
|
||||
list[0][1].remove(i);
|
||||
list[0][1].push(j);
|
||||
list[1][1].remove(j);
|
||||
list[1][1].push(i);
|
||||
if(!give.length) break;
|
||||
}
|
||||
}
|
||||
return [list[0][1],list[1][1]];
|
||||
});
|
||||
}
|
||||
|
@ -10231,8 +10380,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
pai.sort((a,b)=>{
|
||||
return get.value(b,player)-get.value(a,player);
|
||||
});
|
||||
gain=pai.splice(0,player.getDamagedHp());
|
||||
bottom=pai;
|
||||
gain = pai.splice(0,player.getDamagedHp());
|
||||
bottom = cards.slice(0);
|
||||
bottom.removeArray(gain);
|
||||
return [bottom, gain];
|
||||
}
|
||||
return [cards,cards.splice(0,player.getDamagedHp())];
|
||||
|
@ -14172,6 +14322,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subtype:'equip1',
|
||||
distance:{attackFrom:-2},
|
||||
skills:['pyzhuren_heart'],
|
||||
onDestroy(card){
|
||||
if(_status.pyzhuren&&_status.pyzhuren[card.name]){
|
||||
delete _status.pyzhuren[card.name];
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
basic:{
|
||||
equipValue:4
|
||||
|
@ -14185,6 +14340,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subtype:'equip1',
|
||||
distance:{attackFrom:-1},
|
||||
skills:['pyzhuren_diamond'],
|
||||
onDestroy(card){
|
||||
if(_status.pyzhuren&&_status.pyzhuren[card.name]){
|
||||
delete _status.pyzhuren[card.name];
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
basic:{
|
||||
equipValue:3
|
||||
|
@ -14198,6 +14358,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subtype:'equip1',
|
||||
distance:{attackFrom:-1},
|
||||
skills:['pyzhuren_club'],
|
||||
onDestroy(card){
|
||||
if(_status.pyzhuren&&_status.pyzhuren[card.name]){
|
||||
delete _status.pyzhuren[card.name];
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
basic:{
|
||||
equipValue:5
|
||||
|
@ -14223,6 +14388,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
type:'equip',
|
||||
subtype:'equip1',
|
||||
skills:['pyzhuren_spade'],
|
||||
onDestroy(card){
|
||||
if(_status.pyzhuren&&_status.pyzhuren[card.name]){
|
||||
delete _status.pyzhuren[card.name];
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
basic:{
|
||||
equipValue:3
|
||||
|
@ -14236,6 +14406,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subtype:'equip1',
|
||||
distance:{attackFrom:-3},
|
||||
skills:['pyzhuren_shandian'],
|
||||
onDestroy(card){
|
||||
if(_status.pyzhuren&&_status.pyzhuren[card.name]){
|
||||
delete _status.pyzhuren[card.name];
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
basic:{
|
||||
equipValue:3
|
||||
|
@ -14284,7 +14459,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
characterIntro:{
|
||||
cuimao:'请分别查看“崔琰”和“毛玠”的武将介绍。',
|
||||
cuimao:'请分别查看「崔琰」和「毛玠」的武将介绍。',
|
||||
bailingyun:'柏灵筠,女,是电视剧《大军师司马懿之军师联盟》、《虎啸龙吟》中的主要角色之一,由张钧甯饰演。20岁,是曹丕赏赐司马懿的美人,也是曹丕的眼线,被送入司马府中为妾室。柔弱美貌、心机极深。',
|
||||
caoxian:'曹宪(生卒年不详),女,沛国谯县(今安徽省亳州市)人。东汉末年历史人物,汉献帝刘协嫔妃,魏武帝曹操女儿。建安十八年,嫁给汉献帝刘协,受封为贵人。黄初元年(220年),兄弟曹丕称帝后,汉献帝成为山阳公,不知所终。',
|
||||
zhangjian:'张臶(136年-240年),字子明,钜鹿人。汉末三国时期隐士、音乐家,精通谶纬之学。张臶生活的年代从东汉一直到曹魏齐王时期,受到朝廷多次征召,一直回避,不愿做官。他活了一百零五岁,是三国时期有可靠记载的最长寿的人之一。',
|
||||
|
@ -14421,7 +14596,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(storage) str+='<span class="bluetext">';
|
||||
str+='阳,你可令该角色打出至多X张【杀】,然后其失去Y点体力。';
|
||||
if(storage) str+='</span>';
|
||||
str+='(X为你的体力值,Y为X-其打出【杀】数)';
|
||||
str+='(X为你的体力上限,Y为X-其打出【杀】数)';
|
||||
return str;
|
||||
},
|
||||
dcsbyingmou:function(player){
|
||||
|
@ -14452,6 +14627,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
guozhao:['guozhao','xin_guozhao','jsrg_guozhao'],
|
||||
dingshangwan:['dingshangwan','ol_dingshangwan'],
|
||||
qinghegongzhu:['qinghegongzhu','dc_qinghegongzhu'],
|
||||
caofang:['caofang','jsrg_caofang'],
|
||||
},
|
||||
translate:{
|
||||
puyuan:'蒲元',
|
||||
|
@ -14945,7 +15121,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcqiongying:'琼英',
|
||||
dcqiongying_info:'出牌阶段限一次。你可以移动场上的一张牌,然后你弃置一张与此牌花色相同的手牌(若没有该花色的手牌则改为展示所有手牌)。',
|
||||
dcnuanhui:'暖惠',
|
||||
dcnuanhui_info:'结束阶段,你可以选择一名装备区有牌的角色,其可以视为依次使用X张基本牌(X为其装备区牌数)。若其以此法使用了至少两张牌,其弃置装备区里的所有牌。',
|
||||
dcnuanhui_info:'结束阶段,你可以选择一名装备区有牌的角色,其可以视为依次使用X张基本牌(X为其装备区牌数且至少为1)。若其此次以此法使用了同名牌,其弃置装备区里的所有牌。',
|
||||
zhangjian:'张臶',
|
||||
dc_zj_a:'技能',
|
||||
dc_zj_a_info:'锁定技。当你受到牌造成的伤害时,若此牌有点数,则你将此伤害值改为此牌点数,否则你防止此伤害。',
|
||||
|
@ -14956,7 +15132,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcsbmingshi:'明势',
|
||||
dcsbmingshi_info:'摸牌阶段,你可以多摸两张牌,然后展示三张牌并令一名其他角色选择获得其中的一张牌。',
|
||||
dcsbmengmou:'盟谋',
|
||||
dcsbmengmou_info:'转换技,每回合每项各限一次,当你得到其他角色的牌后,或其他角色得到你的牌后:阴,你可以令该角色使用至多X张【杀】,且其每以此法造成1点伤害,其回复1点体力;阳,你可令该角色打出至多X张【杀】,然后其失去Y点体力。(X为你的体力值,Y为X-其打出【杀】数)',
|
||||
dcsbmengmou_info:'转换技,每回合每项各限一次,当你得到其他角色的牌后,或其他角色得到你的牌后:阴,你可以令该角色使用至多X张【杀】,且其每以此法造成1点伤害,其回复1点体力;阳,你可令该角色打出至多X张【杀】,然后其失去Y点体力。(X为你的体力上限,Y为X-其打出【杀】数)',
|
||||
dc_sb_zhouyu:'新杀谋周瑜',
|
||||
dc_sb_zhouyu_prefix:'新杀谋',
|
||||
dcsbronghuo:'融火',
|
||||
|
@ -15010,6 +15186,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcsbquanmou_info:'转换技。出牌阶段每名角色限一次,你可以令一名攻击范围内的其他角色交给你一张牌。阴:当你于本阶段内下次对其造成伤害时,取消之;阳:当你于本阶段内下次对其造成伤害后,你可以选择除其外的至多三名其他角色,对这些角色依次造成1点伤害。',
|
||||
dcsbpingliao:'平辽',
|
||||
dcsbpingliao_info:'锁定技。当你声明使用【杀】时,你令此【杀】的目标对其他角色不可见,且你令攻击范围内的其他角色依次选择是否打出一张红色基本牌。所有角色选择完成后,此牌的目标角色中没有以此法打出牌的角色本回合内无法使用或打出手牌;若有不为此牌目标的角色以此法打出了牌,则你摸两张牌,且你本回合使用【杀】的次数上限+1。',
|
||||
caofang:'曹芳',
|
||||
dczhimin:'置民',
|
||||
dczhimin_tag:'民',
|
||||
dczhimin_info:'锁定技。①一轮游戏开始时,你选择至多X名其他角色(X为你的体力值),获得这些角色各自手牌中的随机一张点数最小的牌。②当你于你的回合外得到牌后,你将这些牌标记为“民”。③当你失去“民”后,你将手牌补至体力上限。',
|
||||
dcjujian:'拒谏',
|
||||
dcjujian_info:'主公技。出牌阶段限一次,你可以令一名其他魏势力角色摸一张牌,然后你令其于本轮内使用的普通锦囊牌对你无效。',
|
||||
|
||||
sp2_yinyu:'隐山之玉',
|
||||
sp2_huben:'百战虎贲',
|
||||
|
|
|
@ -1365,7 +1365,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player:["useCardAfter","respond"],
|
||||
},
|
||||
filter:function (event,player){
|
||||
if(get.itemtype(event.cards)!='cards') return false;
|
||||
if(get.itemtype(event.cards)!=='cards'||!game.hasPlayer(current=>{
|
||||
if(current===player) return false;
|
||||
return current.getHp()>player.getHp()||current.countCards('h')>player.countCards('h');
|
||||
})) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].isInPile()){
|
||||
return true;
|
||||
|
@ -1373,35 +1376,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return false;
|
||||
},
|
||||
direct:true,
|
||||
content:function (){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt2('xinfu_xunxian'),function(card,player,target){
|
||||
if(target==player) return false;
|
||||
return target.countCards('h')>player.countCards('h')||Math.max(0,target.hp)>Math.max(0,player.hp);
|
||||
}).set('ai',function(target){
|
||||
async cost(event, trigger, player){
|
||||
event.result = await player.chooseTarget(get.prompt2('xinfu_xunxian'),(card,player,target)=>{
|
||||
if(target===player) return false;
|
||||
return target.getHp()>player.getHp()||target.countCards('h')>player.countCards('h');
|
||||
}).set('ai',(target)=>{
|
||||
let att=get.attitude(_status.event.player,target),name=_status.event.cards[0].name;
|
||||
if(att<3) return 0;
|
||||
if(target.hasJudge('lebu')) att/=5;
|
||||
if(name==='sha'&&target.hasSha()) att/=5;
|
||||
if(name==='wuxie'&&target.needsToDiscard(_status.event.cards)) att/=5;
|
||||
return att/(1+get.distance(player,target,'absolute'));
|
||||
}).set('cards',trigger.cards);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var list=[];
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(trigger.cards[i].isInPile()){
|
||||
list.push(trigger.cards[i]);
|
||||
}
|
||||
}).set('cards',trigger.cards).forResult();
|
||||
},
|
||||
async content(event, trigger, player){
|
||||
let list=[];
|
||||
for(let i=0;i<trigger.cards.length;i++){
|
||||
if(trigger.cards[i].isInPile()){
|
||||
list.push(trigger.cards[i]);
|
||||
}
|
||||
player.logSkill('xinfu_xunxian',result.targets[0]);
|
||||
result.targets[0].gain(list,'gain2').giver=player;
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
expose:0.3,
|
||||
},
|
||||
if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.2);
|
||||
event.targets[0].gain(list,'gain2').giver=player;
|
||||
}
|
||||
},
|
||||
"xinfu_kannan":{
|
||||
audio:2,
|
||||
|
@ -1740,7 +1737,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"xinfu_limu_info":"出牌阶段,你可以将一张♦牌当做【乐不思蜀】对自己使用,然后回复1点体力。只要你的判定区内有牌,你对攻击范围内的其他角色使用牌便没有次数和距离限制。",
|
||||
xinyingshi:'应势',
|
||||
xinyingshi_info:'出牌阶段开始时,若场上所有角色的武将牌上均没有“酬”,则你可以将任意张牌置于一名角色的武将牌上,称为“酬”。若如此做:当有角色使用牌对有“酬”的角色造成伤害后,其可以获得一张“酬”,并获得牌堆中所有与“酬”花色点数均相同的牌;有“酬”的角色死亡时,你获得其所有“酬”。',
|
||||
|
||||
|
||||
xinghuoliaoyuan_tianfu:'天府',
|
||||
xinghuoliaoyuan_tianliang:'天梁',
|
||||
xinghuoliaoyuan_tianji:'天机',
|
||||
|
|
|
@ -498,14 +498,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var count=trigger.player.countCards('h',card=>get.type2(card)==type);
|
||||
var guessedNum=event.guessedNum;
|
||||
if(count==guessedNum){
|
||||
player.popup('猜测正确','wood');
|
||||
player.popup('洗具');
|
||||
game.log(player,'猜测','#g正确');
|
||||
if(player.countMark('zhenfeng')<5) player.addMark('zhenfeng',1,false);
|
||||
player.draw(player.countMark('zhenfeng'));
|
||||
if(player.canUse('sha',trigger.player,false)) player.useCard({name:'sha',isCard:true},trigger.player);
|
||||
}
|
||||
else{
|
||||
player.popup('猜测错误','fire');
|
||||
player.popup('杯具');
|
||||
game.log(player,'猜测','#y错误');
|
||||
player.clearMark('zhenfeng');
|
||||
if(Math.abs(count-guessedNum)>1&&trigger.player.canUse('sha',player,false)){
|
||||
|
@ -843,6 +843,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
mod:{
|
||||
ignoredHandcard:function(card,player){
|
||||
if(card.hasGaintag('cibei_mark')) return true;
|
||||
},
|
||||
cardDiscardable:function(card,player,name){
|
||||
if(card.hasGaintag('cibei_mark')) return false;
|
||||
},
|
||||
|
@ -2292,7 +2295,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.distance(player,current)>1;
|
||||
})) return false;
|
||||
if(tag=='directHit_ai') return arg.card.name=='sha';
|
||||
if(arg.card.name!='sha'&&arg.card.name!='chuqibuyi') return false;
|
||||
if(!arg||!arg.card||arg.card.name!='sha'&&arg.card.name!='chuqibuyi') return false;
|
||||
var card=arg.target.getEquip(2);
|
||||
if(card&&card.name.indexOf('bagua')!=-1) return true;
|
||||
if(player._xinbenxi_ai) return false;
|
||||
|
@ -11828,36 +11831,90 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return player.hp<player.maxHp;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
event.num=player.getDamagedHp();
|
||||
'step 0'
|
||||
event.num = player.getDamagedHp();
|
||||
player.draw(event.num);
|
||||
"step 1"
|
||||
var check=player.countCards('h')-event.num;
|
||||
if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true});
|
||||
event.given_map = {};
|
||||
event._forcing = false;
|
||||
event.aicheck = function () {
|
||||
let res = {
|
||||
bool: true,
|
||||
cards: []
|
||||
}, cards = player.getCards('he'), tars = game.filterPlayer(i => player !== i);
|
||||
cards.forEach(i => {
|
||||
let o = get.value(i, player), max = o, temp, t;
|
||||
tars.forEach(tar => {
|
||||
temp = get.value(i, tar);
|
||||
if (temp > max) {
|
||||
max = temp;
|
||||
t = tar;
|
||||
}
|
||||
});
|
||||
if (t) res.cards.push([i, t, max - o]);
|
||||
});
|
||||
if (res.cards.length < event.num) res.bool = false;
|
||||
else if (res.cards.length > event.num) res.cards.sort((a, b) => {
|
||||
return b[2] - a[2];
|
||||
}).slice(0, event.num);
|
||||
return res;
|
||||
}();
|
||||
'step 1'
|
||||
player.chooseCardTarget({
|
||||
selectCard:event.num,
|
||||
filterTarget:function(card,player,target){
|
||||
return player!=target;
|
||||
filterCard(card){
|
||||
return get.itemtype(card)=='card'&&!card.hasGaintag('miji_tag');
|
||||
},
|
||||
ai1:function(card){
|
||||
var player=_status.event.player;
|
||||
if(player.maxHp-player.hp==1&&card.name=='du') return 30;
|
||||
var check=_status.event.check;
|
||||
if(check<1) return 0;
|
||||
if(player.hp>1&&check<2) return 0;
|
||||
return get.unuseful(card)+9;
|
||||
filterTarget: lib.filter.notMe,
|
||||
selectCard: [1,event.num],
|
||||
prompt:'请选择要分配的卡牌和目标',
|
||||
forced: event._forcing,
|
||||
ai1(card){
|
||||
if (!_status.event.res.bool || ui.selected.cards.length) return 0;
|
||||
for (let arr of _status.event.res.cards) {
|
||||
if (arr[0] === card) return arr[2];
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
ai2:function(target){
|
||||
var att=get.attitude(_status.event.player,target);
|
||||
if(ui.selected.cards.length==1&&ui.selected.cards[0].name=='du') return 1-att;
|
||||
return att-2;
|
||||
ai2(target){
|
||||
let card = ui.selected.cards[0];
|
||||
for (let arr of _status.event.res.cards) {
|
||||
if (arr[0] === card) return get.attitude(player, target);
|
||||
}
|
||||
let val=target.getUseValue(card);
|
||||
if(val>0) return val*get.attitude(player,target)*2;
|
||||
return get.value(card,target)*get.attitude(player,target);
|
||||
},
|
||||
prompt:'将'+get.cnNumber(event.num)+'张手牌交给一名其他角色',
|
||||
}).set('check',check);
|
||||
"step 2"
|
||||
res: event.aicheck
|
||||
});
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
player.give(result.cards,result.targets[0]);
|
||||
player.line(result.targets,'green');
|
||||
event._forcing = true;
|
||||
var res=result.cards,target=result.targets[0].playerid;
|
||||
player.addGaintag(res,'miji_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(1);
|
||||
}
|
||||
'step 3'
|
||||
if(_status.connectMode){
|
||||
game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});
|
||||
}
|
||||
var map=[],cards=[];
|
||||
for(var i in event.given_map){
|
||||
var source=(_status.connectMode?lib.playerOL:game.playerMap)[i];
|
||||
player.line(source,'green');
|
||||
if(player!==source&&(get.mode()!=='identity'||player.identity!=='nei')) player.addExpose(0.18);
|
||||
map.push([source,event.given_map[i]]);
|
||||
cards.addArray(event.given_map[i]);
|
||||
}
|
||||
game.loseAsync({
|
||||
gain_list:map,
|
||||
player:player,
|
||||
cards:cards,
|
||||
giver:player,
|
||||
animate:'giveAuto',
|
||||
}).setContent('gaincardMultiple');
|
||||
},
|
||||
ai:{
|
||||
threaten:function(player,target){
|
||||
|
@ -13931,7 +13988,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
lingtong:['lingtong','xin_lingtong','ol_lingtong','re_lingtong','old_lingtong'],
|
||||
gaoshun:['gaoshun','xin_gaoshun','ol_gaoshun','re_gaoshun','sb_gaoshun','old_gaoshun'],
|
||||
zhonghui:['zhonghui','xin_zhonghui','re_zhonghui','old_zhonghui','pe_zhonghui'],
|
||||
wangyi:['wangyi','re_wangyi','old_wangyi'],
|
||||
wangyi:['wangyi','ol_wangyi','re_wangyi','old_wangyi'],
|
||||
caozhang:['caozhang','ol_caozhang','re_caozhang','xin_caozhang'],
|
||||
guanzhang:['guanzhang','re_guanzhang','old_guanzhang'],
|
||||
madai:['old_madai','re_madai','tw_madai','madai'],
|
||||
|
@ -14440,6 +14497,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
oldrenxin:'仁心',
|
||||
zhenlie:'贞烈',
|
||||
miji:'秘计',
|
||||
miji_tag:'已分配',
|
||||
zhiyan:'直言',
|
||||
zongxuan:'纵玄',
|
||||
anxu:'安恤',
|
||||
|
@ -14500,7 +14558,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
old_anxu_info:'出牌阶段限一次,你可以选择两名手牌数不同的其他角色,令其中手牌少的角色获得手牌多的角色的一张手牌并展示之。然后若此牌不为黑桃,则你摸一张牌。',
|
||||
zongxuan_info:'当你的牌因弃置而进入弃牌堆后,你可以将其按任意顺序置于牌堆顶。',
|
||||
zhiyan_info:'结束阶段,你可以令一名角色摸一张牌并展示之,若为装备牌,其使用此牌并回复1点体力。',
|
||||
miji_info:'结束阶段,若你已受伤,则可以摸X张牌,然后可以将等量的牌交给一名其他角色(X为你已损失的体力值)。',
|
||||
miji_info:'结束阶段,若你已受伤,则可以摸X张牌,然后可以将等量的牌交给其他角色(X为你已损失的体力值)。',
|
||||
zhenlie_info:'当你成为其他角色使用【杀】或普通锦囊牌的目标后,你可以失去1点体力并令此牌对你无效,然后弃置对方一张牌。',
|
||||
chengxiang_info:'当你受到伤害后,你可以亮出牌堆顶的四张牌。然后获得其中任意数量点数之和不大于13的牌。',
|
||||
oldchengxiang_info:'当你受到伤害后,你可以亮出牌堆顶的四张牌。然后获得其中任意数量点数之和不大于12的牌。',
|
||||
|
@ -14605,7 +14663,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
duwang:'独往',
|
||||
duwang_info:'锁定技。①游戏开始时,你从牌堆顶将五张不为【杀】的牌置于武将牌上,称为“刺”。②若你有牌名不为【杀】“刺”,你至其他角色或其他角色至你的距离+1。',
|
||||
cibei:'刺北',
|
||||
cibei_info:'①当一名角色使用【杀】造成伤害且此牌对应的实体牌进入弃牌堆后,你可以将一张不为【杀】的“刺”置入弃牌堆,并将这些牌置入“刺”,然后弃置一名角色区域里的一张牌。②一名角色的回合结束时,若你的“刺”均为【杀】,你获得所有“刺”,且这些牌不能被弃置,且当你使用对应实体牌包含这些牌的牌时无次数和距离限制。',
|
||||
cibei_info:'①当一名角色使用【杀】造成伤害且此牌对应的实体牌进入弃牌堆后,你可以将一张不为【杀】的“刺”置入弃牌堆,并将这些牌置入“刺”,然后弃置一名角色区域里的一张牌。②一名角色的回合结束时,若你的“刺”均为【杀】,你获得所有“刺”,且这些牌不能被弃置,不计入手牌上限,且当你使用对应实体牌包含这些牌的牌时无次数和距离限制。',
|
||||
wuanguo:'武安国',
|
||||
diezhang:'叠嶂',
|
||||
diezhang_info:'转换技。①出牌阶段,你使用杀的次数上限+1。②阴:当你使用牌被其他角色抵消后,你可以弃置一张牌,视为对其使用X张【杀】;阳:当其他角色使用牌被你抵消后,你可以摸X张牌,视为对其使用一张【杀】(X为1)。',
|
||||
|
|
|
@ -2328,40 +2328,37 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
xianzhu:{
|
||||
trigger:{player:'phaseUseBegin'},
|
||||
direct:true,
|
||||
locked:true,
|
||||
filter:function(event,player){
|
||||
return player.getExpansions('qiaoyan').length>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.cards=player.getExpansions('qiaoyan');
|
||||
player.chooseTarget(true,'请选择【献珠】的目标','将'+get.translation(event.cards)+'交给一名角色。若该角色不为你自己,则你令其视为对其攻击范围内的另一名角色使用【杀】').set('ai',function(target){
|
||||
async cost(event, trigger, player){
|
||||
event.cards = player.getExpansions('qiaoyan');
|
||||
event.result = await player.chooseTarget(true,'请选择【献珠】的目标','将'+get.translation(event.cards)+'交给一名角色。若该角色不为你自己,则你令其视为对其攻击范围内的另一名角色使用【杀】').set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
var eff=get.sgn(get.attitude(player,target))*get.value(_status.event.getParent().cards[0],target);
|
||||
if(player!=target) eff+=Math.max.apply(null,game.filterPlayer(function(current){
|
||||
if(current!=target&&target.inRange(current)&&target.canUse('sha',current)) return true;
|
||||
if(current!=target&&player.inRange(current)&&target.canUse('sha',current,false)) return true;
|
||||
}).map(function(current){
|
||||
return get.effect(current,{name:'sha'},target,player);
|
||||
}));
|
||||
return eff;
|
||||
});
|
||||
}).forResult();
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.cards = player.getExpansions('qiaoyan');
|
||||
event.target = targets[0];
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
event.target=target;
|
||||
player.logSkill('xianzhu',target);
|
||||
player.give(cards,target,'give');
|
||||
}
|
||||
else event.finish();
|
||||
player.give(cards,target,'give');
|
||||
'step 2'
|
||||
if(player!=target&&target.isIn()&&player.isIn()&&game.hasPlayer(function(current){
|
||||
return current!=target&&target.inRange(current)&&target.canUse('sha',current);
|
||||
return current!=target&&player.inRange(current)&&target.canUse('sha',current,false);
|
||||
})){
|
||||
var str=get.translation(target);
|
||||
player.chooseTarget(true,'选择'+str+'攻击范围内的一名角色,视为'+str+'对其使用【杀】',function(card,player,target){
|
||||
player.chooseTarget(true,'选择攻击范围内的一名角色,视为'+str+'对其使用【杀】',function(card,player,target){
|
||||
var source=_status.event.target;
|
||||
return source.inRange(target)&&source.canUse('sha',target);
|
||||
return player.inRange(target)&&source.canUse('sha', target, false);
|
||||
}).set('target',target).set('ai',function(target){
|
||||
var evt=_status.event;
|
||||
return get.effect(target,{name:'sha'},evt.target,evt.player)
|
||||
|
@ -2692,24 +2689,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
game.updateRoundNumber();
|
||||
}
|
||||
},
|
||||
group:'xinquanbian_count',
|
||||
//group:'xinquanbian_count',
|
||||
init:(player,skill)=>player.addSkill('xinquanbian_count'),
|
||||
onremove:(player,skill)=>player.removeSkill('xinquanbian_count'),
|
||||
},
|
||||
xinquanbian_count:{
|
||||
trigger:{player:'useCard1'},
|
||||
trigger:{
|
||||
player:['useCard0','phaseUseBefore','phaseUseAfter']
|
||||
},
|
||||
silent:true,
|
||||
firstDo:true,
|
||||
charlotte:true,
|
||||
filter:function(event,player){
|
||||
if (event.name === 'phaseUse') return true;
|
||||
return player.isPhaseUsing()&&lib.skill.quanbian.hasHand(event)&&get.type(event.card)!='equip';
|
||||
},
|
||||
content:function(){
|
||||
var stat=player.getStat('skill');
|
||||
if(!stat.quanbian) stat.quanbian=0;
|
||||
stat.quanbian++;
|
||||
if (this.trigger.name === 'phaseUse') {
|
||||
delete stat.xinquanbian;
|
||||
}
|
||||
else{
|
||||
if(!stat.xinquanbian) stat.xinquanbian=0;
|
||||
stat.xinquanbian++;
|
||||
}
|
||||
},
|
||||
mod:{
|
||||
cardEnabled2:function(card,player){
|
||||
var stat=player.getStat('skill');
|
||||
if(stat.quanbian&&stat.quanbian>=player.maxHp&&get.position(card)=='h'&&get.type(card,player)!='equip') return false;
|
||||
if(stat.xinquanbian&&stat.xinquanbian>=player.maxHp&&get.position(card)=='h'&&get.type(card,player)!='equip') return false;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -3339,14 +3347,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.addTempSkill('yanxi2');
|
||||
var card2=result.links[0];
|
||||
if(card2==card){
|
||||
player.popup('猜对了');
|
||||
player.popup('洗具');
|
||||
cards.remove(card2);
|
||||
player.$gain2(cards);
|
||||
player.gain(cards,'log').gaintag.add('yanxi');
|
||||
player.gain(card,target,'bySelf','give').gaintag.add('yanxi');
|
||||
}
|
||||
else{
|
||||
player.popup('猜错了');
|
||||
player.popup('杯具');
|
||||
player.gain(card2,'gain2').gaintag.add('yanxi');
|
||||
}
|
||||
},
|
||||
|
@ -3981,7 +3989,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
qiaoyan:'巧言',
|
||||
qiaoyan_info:'锁定技,当你于回合外受到其他角色造成的伤害时,若你:有“珠”,则你令伤害来源获得“珠”;没有“珠”,则你防止此伤害,然后摸一张牌,并将一张牌正面朝上置于武将牌上,称为“珠”。',
|
||||
xianzhu:'献珠',
|
||||
xianzhu_info:'锁定技,出牌阶段开始时,你令一名角色A获得“珠”。若A不为你自己,则你选择A攻击范围内的一名角色B,视为A对B使用一张【杀】。',
|
||||
xianzhu_info:'锁定技,出牌阶段开始时,你令一名角色A获得“珠”。若A不为你自己,则你选择你攻击范围内的一名角色B,视为A对B使用一张【杀】。',
|
||||
chengjichengcui:'成济成倅',
|
||||
oltousui:'透髓',
|
||||
oltousui_info:'你可以将任意张牌置于牌堆底,视为使用一张需使用等量张【闪】抵消的【杀】。',
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
// apk每次安装后第一次启动加载Service Worker会失败
|
||||
// 所以每次导入这个ts判断是否会成功,失败的话重启一次
|
||||
|
||||
export const text: string = 'ts文件导入成功';
|
|
@ -61,6 +61,10 @@ var sawReadOnlySpans = false, sawCollapsedSpans = false;
|
|||
// You can find some technical background for some of the code below
|
||||
// at http://marijnhaverbeke.nl/blog/#cm-internals .
|
||||
|
||||
/**
|
||||
* @type { typeof import('codemirror/index') }
|
||||
*/
|
||||
// @ts-ignore
|
||||
var CodeMirror = (function () {
|
||||
|
||||
// A CodeMirror instance represents an editor. This is the object
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -4,6 +4,7 @@ import { userAgent } from "../noname/util/index.js";
|
|||
|
||||
const coreAndVersion = get.coreInfo();
|
||||
const core = coreAndVersion[0], version = coreAndVersion[1];
|
||||
//@todo: 77 -> 80
|
||||
if (core === 'chrome' && !isNaN(version) && version < 77) {
|
||||
const tip = '检测到您的浏览器内核版本小于77,请及时升级浏览器或手机webview内核!';
|
||||
console.warn(tip);
|
||||
|
|
11
game/game.js
11
game/game.js
|
@ -166,6 +166,7 @@ new Promise(resolve => {
|
|||
// 使用ts compiler对ts文件进行编译
|
||||
const result = ts.transpile(code, {
|
||||
module: ts.ModuleKind.CommonJS,
|
||||
//@todo: ES2019 -> ES2020
|
||||
target: ts.ScriptTarget.ES2019,
|
||||
inlineSourceMap: true,
|
||||
resolveJsonModule: true,
|
||||
|
@ -203,15 +204,23 @@ new Promise(resolve => {
|
|||
});
|
||||
try {
|
||||
const registration_1 = await navigator.serviceWorker.register(`${scope}service-worker.js`, {
|
||||
type: 'module',
|
||||
updateViaCache: "all",
|
||||
scope,
|
||||
});
|
||||
// 初次加载worker,需要重新启动一次
|
||||
if (!findServiceWorker) location.reload();
|
||||
// 接收消息,暂时没用到
|
||||
navigator.serviceWorker.addEventListener('message', e => {
|
||||
console.log(e);
|
||||
});
|
||||
registration_1.update().catch(console.error);
|
||||
registration_1.update().catch(e => console.error('worker update失败', e));
|
||||
if (!sessionStorage.getItem('canUseTs')) {
|
||||
await import('./canUse.ts').then(({ text }) => console.log(text)).catch(() => {
|
||||
sessionStorage.setItem('canUseTs', '1');
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
} catch (e_1) {
|
||||
console.log('serviceWorker加载失败: ', e_1);
|
||||
}
|
||||
|
|
17387
game/jszip.js
17387
game/jszip.js
File diff suppressed because it is too large
Load Diff
|
@ -41588,6 +41588,10 @@ var pinyin_dict_withtone = "yī,dīng zhēng,kǎo qiǎo yú,qī,shàng,xià,hǎn
|
|||
* @param splitter 返回结果拼接字符
|
||||
*/
|
||||
function parsePolyphone(chinese, result, splitter, withtone) {
|
||||
// 先删除中文字符之外的所有字符(包括英文字母、数字、标点符号、空格和其他非中文字符),然后再查找多音字
|
||||
chinese = chinese.replace(/[^\u4e00-\u9fa5]/g, '');
|
||||
if(chinese.length == 0) return result;
|
||||
|
||||
var poly = window.pinyin_dict_polyphone;
|
||||
var max = 7; // 最多只考虑7个汉字的多音字词,虽然词库里面有10个字的,但是数量非常少,为了整体效率暂时忽略之
|
||||
var temp = poly[chinese];
|
||||
|
@ -41604,10 +41608,6 @@ var pinyin_dict_withtone = "yī,dīng zhēng,kǎo qiǎo yú,qī,shàng,xià,hǎn
|
|||
for (var i = 0; i < chinese.length;(i++,m++)) {
|
||||
temp = '';
|
||||
for (var j = 0; j < max && (i + j) < chinese.length; j++) {
|
||||
if (!dict.withtone[chinese[i]]) {
|
||||
i+=(result[m].length-1);
|
||||
break;
|
||||
} // 如果碰到非汉字直接停止本次查找
|
||||
temp += chinese[i + j];
|
||||
var res = poly[temp];
|
||||
if (res) // 如果找到了多音字词语
|
||||
|
|
|
@ -172279,4 +172279,7 @@ ${e.message}`;
|
|||
})();
|
||||
if (typeof module !== "undefined" && module.exports) {
|
||||
module.exports = ts;
|
||||
}
|
||||
if (typeof globalThis !== "undefined") {
|
||||
globalThis.ts = ts;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
Binary file not shown.
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 44 KiB |
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
64
index.html
64
index.html
|
@ -7,6 +7,29 @@
|
|||
<meta name="viewport" content="user-scalable=no, viewport-fit=cover">
|
||||
<title>无名杀</title>
|
||||
<script>
|
||||
if (typeof window.require == 'function' &&
|
||||
typeof window.process == 'object' &&
|
||||
typeof window.__dirname == 'string') {
|
||||
// 使importMap解析node内置模块
|
||||
const builtinModules = require('module').builtinModules;
|
||||
if (Array.isArray(builtinModules)) {
|
||||
const importMap = {
|
||||
imports: {}
|
||||
};
|
||||
for (const module of builtinModules) {
|
||||
importMap.imports[module] =
|
||||
importMap.imports[`node:${module}`] =
|
||||
`./noname-builtinModules/${module}`
|
||||
}
|
||||
const im = document.createElement('script');
|
||||
im.type = 'importmap';
|
||||
im.textContent = JSON.stringify(importMap);
|
||||
document.currentScript.after(im);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
"use strict";
|
||||
(() => {
|
||||
window.onerror = function (msg, src, line, column, err) {
|
||||
let str = `错误文件: ${typeof src == 'string' && src.length > 0 ? decodeURI(src) : '未知文件'}`;
|
||||
|
@ -102,6 +125,7 @@
|
|||
})();
|
||||
</script>
|
||||
<script>
|
||||
"use strict";
|
||||
if (location.href.startsWith('http') && typeof window.initReadWriteFunction != 'function' && !window.require && !window.__dirname) {
|
||||
window.initReadWriteFunction = async function (game) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -116,17 +140,6 @@
|
|||
.catch(reject);
|
||||
|
||||
function callback() {
|
||||
game.createDir = function (dir, success = () => { }, error = () => { }) {
|
||||
fetch(`./createDir?dir=${dir}`)
|
||||
.then(response => {
|
||||
return response.json();
|
||||
})
|
||||
.then(result => {
|
||||
if (result && result.success) success();
|
||||
else error();
|
||||
})
|
||||
.catch(error);
|
||||
};
|
||||
|
||||
game.readFile = function (fileName, callback = () => { }, error = () => { }) {
|
||||
fetch(`./readFile?fileName=${fileName}`)
|
||||
|
@ -224,6 +237,35 @@
|
|||
game.createDir(pathArray.join("/"), callback, console.error);
|
||||
};
|
||||
|
||||
game.createDir = (directory, successCallback = () => { }, errorCallback = () => { }) => {
|
||||
fetch(`./createDir?dir=${directory}`)
|
||||
.then(response => {
|
||||
return response.json();
|
||||
})
|
||||
.then(result => {
|
||||
if (result && result.success) {
|
||||
successCallback();
|
||||
} else {
|
||||
errorCallback(new Error('创建文件夹失败'))
|
||||
};
|
||||
})
|
||||
.catch(errorCallback);
|
||||
};
|
||||
game.removeDir = (directory, successCallback = () => { }, errorCallback = () => { }) => {
|
||||
fetch(`./removeDir?dir=${directory}`)
|
||||
.then(response => {
|
||||
return response.json();
|
||||
})
|
||||
.then(result => {
|
||||
if (result && result.success) {
|
||||
successCallback();
|
||||
} else {
|
||||
errorCallback(new Error('创建文件夹失败'))
|
||||
};
|
||||
})
|
||||
.catch(errorCallback);
|
||||
};
|
||||
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -5565,10 +5565,28 @@ div[data-decoration="bronze"]::after{
|
|||
}
|
||||
}
|
||||
/*--------其它--------*/
|
||||
::-webkit-scrollbar {
|
||||
/* 解放下拉框滚动条! */
|
||||
:not(select)::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
/* 火狐隐藏滚动条 */
|
||||
* {
|
||||
/* 火狐和chrome120+隐藏滚动条 */
|
||||
:not(select) {
|
||||
scrollbar-width: none;
|
||||
}
|
||||
}
|
||||
/* 更新进度条 */
|
||||
progress.progress {
|
||||
width: 75%;
|
||||
height: 10px;
|
||||
border: 2px solid;
|
||||
border-radius: 15px;
|
||||
vertical-align: middle;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
progress.progress::-webkit-progress-bar {
|
||||
background: rgb(239, 239, 239);
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
progress.progress::-webkit-progress-value {
|
||||
border-radius: 0.2rem;
|
||||
background: rgb(0, 117, 255);
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
|
||||
#bosslist>.player .identity {
|
||||
align-items: flex-start;
|
||||
width: min-content;
|
||||
}
|
||||
|
||||
#bosslist>.player .identity>div {
|
||||
|
|
4063
mode/guozhan.js
4063
mode/guozhan.js
File diff suppressed because it is too large
Load Diff
688
mode/single.js
688
mode/single.js
|
@ -68,6 +68,95 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
['spade',2,'bagua'],
|
||||
['club',2,'renwang'],
|
||||
],
|
||||
singlePile_wuxianhuoli:[
|
||||
['heart',1,'wanjian'],
|
||||
['heart',2,'shan'],
|
||||
['heart',2,'huogong'],
|
||||
['heart',3,'tao'],
|
||||
['heart',3,'huogong'],
|
||||
['heart',4,'tao'],
|
||||
['heart',4,'sha','fire'],
|
||||
['heart',6,'tao'],
|
||||
['heart',7,'sha','fire'],
|
||||
['heart',7,'wuzhong'],
|
||||
['heart',8,'wuzhong'],
|
||||
['heart',9,'wuzhong'],
|
||||
['heart',10,'sha'],
|
||||
['heart',10,'sha'],
|
||||
['heart',10,'sha','fire'],
|
||||
['heart',12,'guohe'],
|
||||
['heart',12,'shandian'],
|
||||
['heart',13,'shan'],
|
||||
|
||||
['diamond',1,'juedou'],
|
||||
['diamond',1,'zhuge'],
|
||||
['diamond',1,'zhuque'],
|
||||
['diamond',3,'shunshou'],
|
||||
['diamond',4,'shunshou'],
|
||||
['diamond',5,'guanshi'],
|
||||
['diamond',6,'sha'],
|
||||
['diamond',6,'shan'],
|
||||
['diamond',7,'sha'],
|
||||
['diamond',7,'shan'],
|
||||
['diamond',8,'sha'],
|
||||
['diamond',8,'shan'],
|
||||
['diamond',9,'sha'],
|
||||
['diamond',9,'shan'],
|
||||
['diamond',9,'jiu'],
|
||||
['diamond',10,'shan'],
|
||||
['diamond',11,'shan'],
|
||||
['diamond',12,'tao'],
|
||||
['diamond',12,'wuxie'],
|
||||
['diamond',12,'huogong'],
|
||||
|
||||
['club',1,'juedou'],
|
||||
['club',1,'baiyin'],
|
||||
['club',2,'sha'],
|
||||
['club',2,'bagua'],
|
||||
['club',2,'renwang'],
|
||||
['club',3,'sha'],
|
||||
['club',3,'guohe'],
|
||||
['club',4,'sha'],
|
||||
['club',5,'sha'],
|
||||
['club',5,'sha','thunder'],
|
||||
['club',6,'sha'],
|
||||
['club',6,'sha','thunder'],
|
||||
['club',7,'sha'],
|
||||
['club',7,'sha','thunder'],
|
||||
['club',7,'nanman'],
|
||||
['club',8,'sha'],
|
||||
['club',9,'sha'],
|
||||
['club',9,'jiu'],
|
||||
['club',12,'wuxie'],
|
||||
['club',13,'wuxie'],
|
||||
|
||||
['spade',1,'juedou'],
|
||||
['spade',1,'guding'],
|
||||
['spade',2,'cixiong'],
|
||||
['spade',2,'hanbing'],
|
||||
['spade',2,'tengjia'],
|
||||
['spade',3,'shunshou'],
|
||||
['spade',4,'sha','thunder'],
|
||||
['spade',4,'guohe'],
|
||||
['spade',4,'shunshou'],
|
||||
['spade',5,'sha','thunder'],
|
||||
['spade',5,'qinglong'],
|
||||
['spade',6,'sha','thunder'],
|
||||
['spade',6,'qinggang'],
|
||||
['spade',7,'sha'],
|
||||
['spade',7,'sha','thunder'],
|
||||
['spade',8,'sha'],
|
||||
['spade',8,'sha'],
|
||||
['spade',8,'sha','thunder'],
|
||||
['spade',9,'sha'],
|
||||
['spade',9,'jiu'],
|
||||
['spade',10,'sha'],
|
||||
['spade',10,'bingliang'],
|
||||
['spade',11,'wuxie'],
|
||||
['spade',12,'guohe'],
|
||||
['spade',12,'zhangba'],
|
||||
['spade',13,'nanman'],
|
||||
],
|
||||
characterSingle:{
|
||||
caocao:['male','wei',4,['jianxiong'],['zhu']],
|
||||
simayi:['male','wei',3,['fankui','guicai']],
|
||||
|
@ -207,6 +296,25 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
card[2]=='wuxie'&&card[0]=='diamond'&&card[1]==12) lib.card.list.splice(i--,1);
|
||||
}
|
||||
}
|
||||
else if(_status.mode=='wuxianhuoli'){
|
||||
var list=[];
|
||||
lib.card.list=lib.singlePile_wuxianhuoli.slice(0);
|
||||
game.fixedPile=true;
|
||||
if(_status.connectMode) list=get.charactersOL();
|
||||
else{
|
||||
var list=[];
|
||||
for(var i in lib.character){
|
||||
if(!lib.filter.characterDisabled2(i)&&!lib.filter.characterDisabled(i)) list.push(i);
|
||||
}
|
||||
}
|
||||
game.countPlayer2(function(current){
|
||||
list.remove(current.name);
|
||||
list.remove(current.name1);
|
||||
list.remove(current.name2);
|
||||
});
|
||||
_status.characterlist=list;
|
||||
game.broadcast(list=>_status.characterlist=list,list);
|
||||
}
|
||||
if(_status.connectMode){
|
||||
lib.configOL.number=2;
|
||||
game.randomMapOL();
|
||||
|
@ -242,6 +350,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
|
||||
game.gameDraw(game.zhu,function(player){
|
||||
if(_status.mode=='dianjiang') return 4;
|
||||
if(_status.mode=='wuxianhuoli') return 4;
|
||||
if(_status.mode=='normal') return player==game.zhu?3:4;
|
||||
if(_status.mode=='changban') return player==game.fan?5:4;
|
||||
if(player.hasSkill('cuorui')){
|
||||
|
@ -250,7 +359,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return player.maxHp;
|
||||
});
|
||||
if(_status.connectMode&&lib.configOL.change_card) game.replaceHandcards(game.players.slice(0));
|
||||
'step 4'
|
||||
game.phaseLoop(game.zhu);
|
||||
game.countPlayer(current=>current.showGiveup(),true);
|
||||
},
|
||||
game:{
|
||||
canReplaceViewpoint:()=>true,
|
||||
|
@ -375,11 +487,125 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},500);
|
||||
});
|
||||
},
|
||||
chooseCharacterWuxianhuoli(){
|
||||
const next=game.createEvent('chooseCharacter');
|
||||
next.showConfig=true;
|
||||
next.setContent(function(){
|
||||
'step 0'
|
||||
ui.arena.classList.add('choose-character');
|
||||
lib.init.onfree();
|
||||
var num=[0,1].randomGet();
|
||||
game.players[num].identity='zhu';
|
||||
game.players[1-num].identity='fan';
|
||||
game.broadcastAll(function(p,t){
|
||||
p.enemy=t;t.enemy=p;
|
||||
},game.players[0],game.players[1]);
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].showIdentity();
|
||||
}
|
||||
game.globalBuff=['wuxianhuoli_weisuoyuwei'];
|
||||
const randomBuff=[
|
||||
'liuanhuaming',
|
||||
'duoduoyishan',
|
||||
'xushidaifa',
|
||||
'mianmianjudao'
|
||||
].randomGet();
|
||||
game.globalBuff.add(`wuxianhuoli_${randomBuff}`);
|
||||
'step 1'
|
||||
_status.characterChoice={
|
||||
zhu:_status.characterlist.randomRemove(6),
|
||||
fan:_status.characterlist.randomRemove(6),
|
||||
};
|
||||
const dialog=[
|
||||
'请选择出场武将',
|
||||
'<div class="text center">本局游戏Buff</div>',
|
||||
];
|
||||
game.globalBuff.forEach((buff,ind)=>{
|
||||
dialog.add(`<div class="text">「${ind===0?'固定':'随机'}」 ${get.translation(buff)}:${get.skillInfoTranslation(buff)}</div>`);
|
||||
});
|
||||
dialog.add([_status.characterChoice[game.me.identity],'character']);
|
||||
game.me.chooseButton(true,dialog);
|
||||
'step 2'
|
||||
game.me.init(result.links[0]);
|
||||
_status.characterChoice[game.me.identity].removeArray(result.links);
|
||||
var list=_status.characterChoice[game.me.enemy.identity].randomRemove(1);
|
||||
game.me.enemy.init(list[0]);
|
||||
[game.me,game.me.enemy].forEach(current=>{
|
||||
if(current.storage.nohp||lib.character[current.name1][4].includes('hiddenSkill')&&!current.noclick){
|
||||
current.storage.rawHp=1;
|
||||
current.storage.rawMaxHp=1;
|
||||
}
|
||||
current.hp=10;
|
||||
current.maxHp=10;
|
||||
current.hujia=0;
|
||||
current.update();
|
||||
});
|
||||
game.globalBuff.forEach(buff=>{
|
||||
game.addGlobalSkill(buff);
|
||||
});
|
||||
game.addGlobalSkill('wuxianhuoli_task');
|
||||
_status.wuxianhuoliProgress=0;
|
||||
_status.wuxianhuoliLevel=0;
|
||||
const func=()=>{
|
||||
ui.wuxianhuoliProgress=get.is.phoneLayout()?ui.create.div('.touchinfo.left',ui.window):ui.create.div(ui.gameinfo);
|
||||
ui.wuxianhuoliProgress.innerHTML='任务进度(0/3)';
|
||||
const showTasks=()=>{
|
||||
if(ui.wuxianhuoliInfo) return;
|
||||
ui.wuxianhuoliInfo=ui.create.system('无限火力',null,true);
|
||||
ui.wuxianhuoliInfo.currentProgress=0;
|
||||
ui.wuxianhuoliInfo.currentLevel=0;
|
||||
lib.setPopped(ui.wuxianhuoliInfo,()=>{
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
uiintro.add(`<div class="text center" style="font-size:18px"><b>任务列表</b></div>`);
|
||||
if(typeof _status.wuxianhuoliLevel!=='number'){
|
||||
uiintro.add(`<div class="text center" style="font-size:12px">未获取当前进度,请于一名角色受伤后再查看</div>`);
|
||||
}
|
||||
else if(_status.wuxianhuoliLevel<2){
|
||||
uiintro.add(`<div class="text center">全场角色造成${_status.wuxianhuoliLevel===0?3:5}点伤害(当前${_status.wuxianhuoliProgress}点)</div>\
|
||||
<div class="text center">奖励:获得一个技能,摸两张牌</div>`);
|
||||
}
|
||||
else{
|
||||
uiintro.add(`<div class="text center">所有任务已完成,无后续任务</div>`);
|
||||
}
|
||||
uiintro.add(`<div class="text center" style="font-size:18px"><b>全局Buff</b></div>`);
|
||||
uiintro.add(`<div class="text">${game.globalBuff.map((buff,ind)=>{
|
||||
return get.translation(buff)+':'+get.skillInfoTranslation(buff);
|
||||
}).join('<br>')}</div>`);
|
||||
var ul=uiintro.querySelector('ul');
|
||||
if(ul) ul.style.width='180px';
|
||||
uiintro.add(ui.create.div('.placeholder'));
|
||||
return uiintro;
|
||||
},250);
|
||||
};
|
||||
showTasks();
|
||||
var dialog=ui.create.dialog('hidden','forcebutton');
|
||||
dialog.add(`任务一`);
|
||||
dialog.addText(`任务:全场角色共计造成3点伤害<br>奖励:获得一个技能,摸两张牌`);
|
||||
dialog.add(`任务二<div class="text center" style="font-size:10px">(完成任务一后解锁)</div>\
|
||||
<div class="text center">任务:全场角色共计造成5点伤害<br>奖励:获得一个技能,摸两张牌</div>`);
|
||||
dialog.open();
|
||||
setTimeout(()=>{
|
||||
dialog.close();
|
||||
},3000);
|
||||
};
|
||||
game.broadcastAll(func);
|
||||
game.delay(0,3000);
|
||||
'step 3'
|
||||
_status.characterlist.addArray(Object.values(_status.characterChoice).flat());
|
||||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
});
|
||||
},
|
||||
chooseCharacter:function(){
|
||||
if(_status.mode=='dianjiang'){
|
||||
game.chooseCharacterDianjiang();
|
||||
return;
|
||||
}
|
||||
if(_status.mode=='wuxianhuoli'){
|
||||
game.chooseCharacterWuxianhuoli();
|
||||
return;
|
||||
}
|
||||
var next=game.createEvent('chooseCharacter');
|
||||
next.showConfig=true;
|
||||
next.setContent(function(){
|
||||
|
@ -612,11 +838,168 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},game.fan,result.links[0],event.videoId);
|
||||
});
|
||||
},
|
||||
chooseCharacterWuxianhuoliOL(){
|
||||
var next=game.createEvent('chooseCharacter');
|
||||
next.showConfig=true;
|
||||
next.setContent(function(){
|
||||
'step 0'
|
||||
ui.arena.classList.add('choose-character');
|
||||
var num=[0,1].randomGet();
|
||||
game.players[num].identity='zhu';
|
||||
game.players[1-num].identity='fan';
|
||||
game.broadcastAll(function(p,t){
|
||||
p.enemy=t;t.enemy=p;
|
||||
},game.players[0],game.players[1]);
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].showIdentity();
|
||||
}
|
||||
game.globalBuff=['wuxianhuoli_weisuoyuwei'];
|
||||
const randomBuff=[
|
||||
'liuanhuaming',
|
||||
'duoduoyishan',
|
||||
'xushidaifa',
|
||||
'mianmianjudao'
|
||||
].randomGet();
|
||||
game.globalBuff.add(`wuxianhuoli_${randomBuff}`);
|
||||
const setBuff=buff=>{game.globalBuff=buff};
|
||||
game.broadcast(setBuff,game.globalBuff);
|
||||
if(!_status.postReconnect.wuxianhuoliBuff) _status.postReconnect.wuxianhuoliBuff=[setBuff,[]];
|
||||
_status.postReconnect.wuxianhuoliBuff[1].addArray(game.globalBuff);
|
||||
'step 1'
|
||||
_status.characterChoice={
|
||||
zhu:_status.characterlist.randomRemove(6),
|
||||
fan:_status.characterlist.randomRemove(6),
|
||||
};
|
||||
const list=['zhu','fan'].map(identity=>{
|
||||
const dialog=[
|
||||
'请选择出场武将',
|
||||
'<div class="text center">本局游戏Buff</div>',
|
||||
];
|
||||
game.globalBuff.forEach((buff,ind)=>{
|
||||
dialog.add(`<div class="text">「${ind===0?'固定':'随机'}」 ${get.translation(buff)}:${get.skillInfoTranslation(buff)}</div>`);
|
||||
});
|
||||
dialog.add([_status.characterChoice[identity],'character']);
|
||||
return [game[identity],true,dialog];
|
||||
});
|
||||
game.me.chooseButtonOL(list,function(player,result){
|
||||
if(game.online||player==game.me){
|
||||
player.init(result.links[0]);
|
||||
player.hp=10;
|
||||
player.maxHp=10;
|
||||
player.hujia=0;
|
||||
player.update();
|
||||
}
|
||||
});
|
||||
'step 2'
|
||||
for(var i in result){
|
||||
var current=lib.playerOL[i];
|
||||
if(result[i]=='ai'){
|
||||
result[i]=_status.characterChoice[current.identity].randomGets(1);
|
||||
}
|
||||
else{
|
||||
result[i]=result[i].links;
|
||||
}
|
||||
_status.characterChoice[current.identity].removeArray(result[i]);
|
||||
if(!current.name){
|
||||
current.init(result[i][0]);
|
||||
if(current.storage.nohp||lib.character[current.name1][4].includes('hiddenSkill')&&!current.noclick){
|
||||
current.storage.rawHp=1;
|
||||
current.storage.rawMaxHp=1;
|
||||
}
|
||||
current.hp=10;
|
||||
current.maxHp=10;
|
||||
current.hujia=0;
|
||||
current.update();
|
||||
}
|
||||
}
|
||||
game.broadcast(function(result){
|
||||
for(var i in result){
|
||||
const current=lib.playerOL[i];
|
||||
if(!current.name){
|
||||
current.init(result[i][0]);
|
||||
if(current.storage.nohp||lib.character[current.name1][4].includes('hiddenSkill')&&!current.noclick){
|
||||
current.storage.rawHp=1;
|
||||
current.storage.rawMaxHp=1;
|
||||
}
|
||||
current.hp=10;
|
||||
current.maxHp=10;
|
||||
current.hujia=0;
|
||||
current.update();
|
||||
}
|
||||
}
|
||||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
},result);
|
||||
game.globalBuff.forEach(buff=>{
|
||||
game.addGlobalSkill(buff);
|
||||
});
|
||||
game.addGlobalSkill('wuxianhuoli_task');
|
||||
game.broadcastAll(()=>{
|
||||
_status.wuxianhuoliProgress=0;
|
||||
_status.wuxianhuoliLevel=0;
|
||||
});
|
||||
const func=()=>{
|
||||
ui.wuxianhuoliProgress=get.is.phoneLayout()?ui.create.div('.touchinfo.left',ui.window):ui.create.div(ui.gameinfo);
|
||||
ui.wuxianhuoliProgress.innerHTML='任务进度(0/3)';
|
||||
const showTasks=()=>{
|
||||
if(ui.wuxianhuoliInfo) return;
|
||||
ui.wuxianhuoliInfo=ui.create.system('无限火力',null,true);
|
||||
ui.wuxianhuoliInfo.currentProgress=0;
|
||||
ui.wuxianhuoliInfo.currentLevel=0;
|
||||
lib.setPopped(ui.wuxianhuoliInfo,()=>{
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
uiintro.add(`<div class="text center" style="font-size:18px"><b>任务列表</b></div>`);
|
||||
if(typeof _status.wuxianhuoliLevel!=='number'){
|
||||
uiintro.add(`<div class="text center" style="font-size:12px">未获取当前进度,请于一名角色受伤后再查看</div>`);
|
||||
}
|
||||
else if(_status.wuxianhuoliLevel<2){
|
||||
uiintro.add(`<div class="text center">全场角色造成${_status.wuxianhuoliLevel===0?3:5}点伤害(当前${_status.wuxianhuoliProgress}点)</div>\
|
||||
<div class="text center">奖励:获得一个技能,摸两张牌</div>`);
|
||||
}
|
||||
else{
|
||||
uiintro.add(`<div class="text center">所有任务已完成,无后续任务</div>`);
|
||||
}
|
||||
uiintro.add(`<div class="text center" style="font-size:18px"><b>全局Buff</b></div>`);
|
||||
uiintro.add(`<div class="text">${game.globalBuff.map((buff,ind)=>{
|
||||
return get.translation(buff)+':'+get.skillInfoTranslation(buff);
|
||||
}).join('<br>')}</div>`);
|
||||
var ul=uiintro.querySelector('ul');
|
||||
if(ul) ul.style.width='180px';
|
||||
uiintro.add(ui.create.div('.placeholder'));
|
||||
return uiintro;
|
||||
},250);
|
||||
};
|
||||
showTasks();
|
||||
if(!_status.postReconnect.wuxianhuoliShowTasks) _status.postReconnect.wuxianhuoliShowTasks=[showTasks,[]];
|
||||
const dialog=ui.create.dialog('hidden','forcebutton');
|
||||
dialog.add(`任务一`);
|
||||
dialog.addText(`任务:全场角色共计造成3点伤害<br>奖励:获得一个技能,摸两张牌`);
|
||||
dialog.add(`任务二<div class="text center" style="font-size:10px">(完成任务一后解锁)</div>\
|
||||
<div class="text center">任务:全场角色共计造成5点伤害<br>奖励:获得一个技能,摸两张牌</div>`);
|
||||
dialog.open();
|
||||
setTimeout(()=>{
|
||||
dialog.close();
|
||||
},3000);
|
||||
};
|
||||
game.broadcastAll(func);
|
||||
game.delay(0,3000);
|
||||
'step 3'
|
||||
_status.characterlist.addArray(Object.values(_status.characterChoice).flat());
|
||||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
});
|
||||
},
|
||||
chooseCharacterOL:function(){
|
||||
if(_status.mode=='dianjiang'){
|
||||
game.chooseCharacterDianjiangOL();
|
||||
return;
|
||||
}
|
||||
if(_status.mode=='wuxianhuoli'){
|
||||
game.chooseCharacterWuxianhuoliOL();
|
||||
return;
|
||||
}
|
||||
var next=game.createEvent('chooseCharacter');
|
||||
next.setContent(function(){
|
||||
"step 0"
|
||||
|
@ -1138,6 +1521,297 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
},
|
||||
wuxianhuoli_weisuoyuwei:{
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:true,
|
||||
charlotte:true,
|
||||
async content(_,__,player){
|
||||
player.draw();
|
||||
},
|
||||
mod:{
|
||||
cardUsable(card,player,num){
|
||||
if(card.name=='sha') return num+1;
|
||||
},
|
||||
},
|
||||
},
|
||||
wuxianhuoli_duoduoyishan:{
|
||||
trigger:{global:'phaseEnd'},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:true,
|
||||
charlotte:true,
|
||||
async content(_,__,player){
|
||||
player.draw();
|
||||
},
|
||||
},
|
||||
wuxianhuoli_xushidaifa:{
|
||||
trigger:{source:'damageBegin1'},
|
||||
filter(event,player){
|
||||
if(!event.card||event.card.name!=='sha') return false;
|
||||
return game.getGlobalHistory('everything',evt=>{
|
||||
if(evt.name!=='damage') return false;
|
||||
return evt.card&&evt.card.name==='sha';
|
||||
}).indexOf(event)===0;
|
||||
},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:true,
|
||||
charlotte:true,
|
||||
async content(_,trigger){
|
||||
trigger.increase('num');
|
||||
},
|
||||
},
|
||||
wuxianhuoli_liuanhuaming:{
|
||||
trigger:{
|
||||
player:'loseAfter',
|
||||
global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'],
|
||||
},
|
||||
filter(event,player){
|
||||
if(player===_status.currentPhase) return false;
|
||||
const evt=event.getl(player);
|
||||
return evt.cards2&&evt.cards2.length>0;
|
||||
},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:true,
|
||||
charlotte:true,
|
||||
usable:2,
|
||||
async content(_,__,player){
|
||||
player.draw();
|
||||
},
|
||||
},
|
||||
wuxianhuoli_mianmianjudao:{
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:true,
|
||||
charlotte:true,
|
||||
async content(_,__,player){
|
||||
const cards=[];
|
||||
for(const type of ['basic','trick']){
|
||||
const card=get.cardPile(card=>{
|
||||
const typex=get.type2(card,false);
|
||||
return type===typex;
|
||||
});
|
||||
if(card) cards.add(card);
|
||||
}
|
||||
if(cards.length) player.gain(cards,'gain2');
|
||||
},
|
||||
},
|
||||
wuxianhuoli_task:{
|
||||
trigger:{source:'damageAfter'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
silent:true,
|
||||
charlotte:true,
|
||||
async content(event,trigger,player){
|
||||
if(!_status.wuxianhuoliProgress) _status.wuxianhuoliProgress=0;
|
||||
if(!_status.wuxianhuoliLevel) _status.wuxianhuoliLevel=0;
|
||||
if(_status.wuxianhuoliLevel>1) return;
|
||||
_status.wuxianhuoliProgress+=trigger.num;
|
||||
game.broadcastAll((num,level)=>{
|
||||
_status.wuxianhuoliProgress=num;
|
||||
_status.wuxianhuoliLevel=level;
|
||||
if(!ui.wuxianhuoliProgress){
|
||||
ui.wuxianhuoliProgress=get.is.phoneLayout()?ui.create.div('.touchinfo.left',ui.window):ui.create.div(ui.gameinfo);
|
||||
}
|
||||
ui.wuxianhuoliProgress.innerHTML='任务进度('+num+'/'+(level===0?3:5)+')';
|
||||
},_status.wuxianhuoliProgress,_status.wuxianhuoliLevel);
|
||||
if(_status.wuxianhuoliProgress<(_status.wuxianhuoliLevel===0?3:5)) return;
|
||||
game.broadcastAll(()=>{
|
||||
_status.wuxianhuoliProgress=0;
|
||||
_status.wuxianhuoliLevel++;
|
||||
});
|
||||
let next;
|
||||
const send=(skills,refreshable,stop=false)=>{
|
||||
let next=game.createEvent('wuxianhuoli_reward',false);
|
||||
next.setContent(lib.skill.wuxianhuoli_task.contentx);
|
||||
next.set('skills',skills);
|
||||
next.set('refreshable',refreshable);
|
||||
next.set('includeOut',true);
|
||||
if(!stop) game.resume();
|
||||
return next;
|
||||
};
|
||||
const sendback=(result,player)=>{
|
||||
if(!result) result={};
|
||||
if(!result.control&&(typeof result.index!=='number'||result.index<0)){
|
||||
result.index=0;
|
||||
}
|
||||
results.push([player,result]);
|
||||
};
|
||||
const ai_targets=[],results=[],players=game.players.slice(),skillsMap={};
|
||||
let withme=false,withol=false,withai=false;
|
||||
for(const current of players){
|
||||
if(_status.connectMode) current.showTimer();
|
||||
const skills=get.info('wuxianhuoli_task').getSkills();
|
||||
const refreshable=!current.storage.wuxianhuoli_refreshed;
|
||||
skillsMap[current.playerid]=skills;
|
||||
if(current.isOnline()){
|
||||
withol=true;
|
||||
current.send(send,skills,refreshable);
|
||||
current.wait(sendback);
|
||||
}
|
||||
else if(current==game.me){
|
||||
withme=true;
|
||||
next=send(skills,refreshable,true);
|
||||
if(_status.connectMode) game.me.wait(sendback);
|
||||
}
|
||||
else{
|
||||
ai_targets.push(current);
|
||||
}
|
||||
}
|
||||
if(ai_targets.length){
|
||||
for(let i=0;i<ai_targets.length;i++){
|
||||
const current=ai_targets[i];
|
||||
if(players.includes(current)){
|
||||
sendback({index:0},current);
|
||||
ai_targets.splice(i--,1);
|
||||
}
|
||||
}
|
||||
if(ai_targets.length){
|
||||
ai_targets.randomSort();
|
||||
setTimeout(function(){
|
||||
event.interval=setInterval(function(){
|
||||
const current=ai_targets.shift();
|
||||
if(players.includes(current)){
|
||||
sendback({index:0},current);
|
||||
}
|
||||
if(!ai_targets.length){
|
||||
clearInterval(event.interval);
|
||||
if(withai) game.resume();
|
||||
}
|
||||
},_status.connectMode?750:75);
|
||||
},500);
|
||||
}
|
||||
}
|
||||
if(withme){
|
||||
let result=await next.forResult();
|
||||
if(_status.connectMode){
|
||||
game.me.unwait(result,game.me);
|
||||
}
|
||||
else{
|
||||
if(!result) result={};
|
||||
if(!result.control&&(typeof result.index!=='number'||result.index<0)){
|
||||
result.index=0;
|
||||
}
|
||||
results.push([game.me,result]);
|
||||
}
|
||||
}
|
||||
if(withol&&!event.resultOL){
|
||||
await new Promise((resolve)=>{
|
||||
const interval=setInterval(()=>{
|
||||
if(results.length===players.length){
|
||||
resolve();
|
||||
clearInterval(interval);
|
||||
}
|
||||
},4);
|
||||
});
|
||||
}
|
||||
if(ai_targets.length>0){
|
||||
withai=true;
|
||||
await new Promise((resolve)=>{
|
||||
const interval=setInterval(()=>{
|
||||
if(results.length===players.length){
|
||||
resolve();
|
||||
clearInterval(interval);
|
||||
}
|
||||
},4);
|
||||
});
|
||||
}
|
||||
if(_status.connectMode){
|
||||
for(var i of players) i.hideTimer();
|
||||
}
|
||||
const entries=[];
|
||||
for(const res of results){
|
||||
const target=res[0],result=res[1];
|
||||
if(!target||!result) continue;
|
||||
let skill=result.control;
|
||||
if(!skill) skill=skillsMap[target.playerid][result.index];
|
||||
if(result.refreshed) target.storage.wuxianhuoli_refreshed=true;
|
||||
entries.push([target,skill]);
|
||||
}
|
||||
entries.sort((a,b)=>lib.sort.seat(a[0],b[0]));
|
||||
for(const entry of entries){
|
||||
entry[0].popup(entry[1]);
|
||||
await entry[0].addSkills(entry[1]);
|
||||
}
|
||||
for(const entry of entries){
|
||||
await entry[0].draw(2,'nodelay');
|
||||
}
|
||||
game.broadcastAll((num,level)=>{
|
||||
if(level===2&&ui.wuxianhuoliProgress){
|
||||
ui.wuxianhuoliProgress.innerHTML='';
|
||||
return;
|
||||
}
|
||||
if(!ui.wuxianhuoliProgress){
|
||||
ui.wuxianhuoliProgress=get.is.phoneLayout()?ui.create.div('.touchinfo.left',ui.window):ui.create.div(ui.gameinfo);
|
||||
}
|
||||
ui.wuxianhuoliProgress.innerHTML='任务进度('+num+'/'+(level===0?3:5)+')';
|
||||
},_status.wuxianhuoliProgress,_status.wuxianhuoliLevel);
|
||||
await game.asyncDelay();
|
||||
},
|
||||
getSkills(num=6){
|
||||
let allList=_status.characterlist.slice(0);
|
||||
let list=[];
|
||||
let skills=[];
|
||||
let map=[];
|
||||
let entries=[];
|
||||
allList.randomSort();
|
||||
for(let i=0;i<allList.length;i++){
|
||||
let name=allList[i];
|
||||
let skills2=lib.character[name][3].slice();
|
||||
skills2.randomSort();
|
||||
outer:for(let j=0;j<skills2.length;j++){
|
||||
let list2=[skills2[j]];
|
||||
game.expandSkills(list2);
|
||||
for(let k=0;k<list2.length;k++){
|
||||
let info=lib.skill[list2[k]];
|
||||
if(!info||info.silent||info.juexingji||info.hiddenSkill||info.dutySkill||info.zhuSkill||info.unique||info.groupSkill) continue;
|
||||
if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue;
|
||||
list.add(name);
|
||||
if(!map[name]) map[name]=[];
|
||||
map[name].push(skills2[j]);
|
||||
skills.add(skills2[j]);
|
||||
entries.push([name,skills2[j]]);
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
if(list.length>=num) break;
|
||||
}
|
||||
return skills;
|
||||
},
|
||||
async contentx(event){
|
||||
_status.noclearcountdown=true;
|
||||
const controls=[link=>{
|
||||
const evt=get.event();
|
||||
evt.result={refresh:true};
|
||||
event.control.classList.add('disabled');
|
||||
event.control.firstChild.innerText='刷新(1/1)';
|
||||
game.resume();
|
||||
}];
|
||||
event.control=ui.create.control(controls.concat(['刷新(0/1)','stayleft']));
|
||||
if(!event.refreshable){
|
||||
event.control.classList.add('disabled');
|
||||
event.control.firstChild.innerText='刷新(1/1)';
|
||||
}
|
||||
let refreshed=false,result;
|
||||
while(true){
|
||||
const skills=event.skills.slice(3*refreshed,3*(refreshed+1));
|
||||
const next=game.me.chooseControl(skills).set('choiceList',skills.map(skill=>{
|
||||
return '<div class="skill">【'+get.translation(lib.translate[skill+'_ab']||get.translation(skill).slice(0,2))+'】</div>'+
|
||||
'<div>'+get.skillInfoTranslation(skill,game.me)+'</div>';
|
||||
})).set('displayIndex',false).set('prompt','选择获得一个技能');
|
||||
result=await next.forResult();
|
||||
if(!result.refresh) break;
|
||||
refreshed=true;
|
||||
}
|
||||
if(event.control) event.control.close();
|
||||
delete _status.noclearcountdown;game.stopCountChoose();
|
||||
event.result={control:result.control,refreshed};
|
||||
},
|
||||
},
|
||||
},
|
||||
singleTranslate:{
|
||||
xiahouyuan:'夏侯渊',
|
||||
|
@ -1161,6 +1835,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
normal2:'新1v1',
|
||||
changban2:'血战长坂坡',
|
||||
dianjiang2:'点将单挑',
|
||||
wuxianhuoli2:'无限火力',
|
||||
|
||||
wuxianhuoli_weisuoyuwei:'为所欲为',
|
||||
wuxianhuoli_weisuoyuwei_info:'①准备阶段,你摸一张牌。②你使用【杀】的次数上限+1。',
|
||||
wuxianhuoli_duoduoyishan:'多多益善',
|
||||
wuxianhuoli_duoduoyishan_info:'一名角色的回合结束时,你摸一张牌。',
|
||||
wuxianhuoli_xushidaifa:'蓄势待发',
|
||||
wuxianhuoli_xushidaifa_info:'当你于一回合首次造成渠道为【杀】的伤害时,此伤害+1。',
|
||||
wuxianhuoli_liuanhuaming:'柳暗花明',
|
||||
wuxianhuoli_liuanhuaming_info:'每回合限两次。当你于回合外失去牌后,你摸一张牌。',
|
||||
wuxianhuoli_mianmianjudao:'面面俱到',
|
||||
wuxianhuoli_mianmianjudao_info:'准备阶段,你从牌堆或弃牌堆中获得基本牌和锦囊牌各一张。',
|
||||
|
||||
wanrong:'婉容',
|
||||
wanrong_info:'当你成为【杀】的目标后,你可以摸一张牌。',
|
||||
|
@ -1191,6 +1877,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
help:{
|
||||
'血战长坂':'<div style="margin:10px">游戏规则</div><ul style="margin-top:0"><li>选将阶段<br>双方在游戏开始时由系统随机分配身份。分配到先手身份的玩家优先出牌,分配到后手身份的玩家优先选将。<br>双方各自随机获得3名暗置武将,同时从将池中随机选出6名明置武将,由后手玩家开始,按照一次1张-2张-2张-1张的顺序,轮流选择获得明置武将。之后双方各从自己的6名武将中选择2名分别作为主将和副将进行游戏。<li>胜利条件<br>对方死亡。'+
|
||||
'<li>双将规则<br>双将主将决定角色的性别和势力,体力上限为主副将体力上限的平均值,向下取整。体力上限为3的角色可在游戏开始后更换一次起始手牌。<li>牌堆<br>牌堆中移除【木牛流马】【闪电】,♣花色的【藤甲】和【无懈可击 ♦️Q】️</ul>',
|
||||
'无限火力':'<div style="margin:10px">1v1火力全开模式</div><ul style="margin-top:0">(来自三国杀国际服)<li>所有角色的初始体力值和体力上限均为10,护甲均为0<li>每局游戏会有一个固定的Buff和一个随机的Buff,对所有角色生效'+
|
||||
'<li>游戏全程会有两个任务,分别为“所有角色造成3点伤害”和“所有角色造成5点伤害”,在任务一完成后才会解锁任务二。<br>每当任务完成时,系统会发放奖励:所有角色观看三个随机的技能并获得其中一个(每名角色每局有一次刷新的机会),然后摸两张牌。',
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
|
@ -0,0 +1,15 @@
|
|||
# Installation
|
||||
> `npm install --save @types/codemirror`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for codemirror (https://github.com/codemirror/CodeMirror).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/codemirror.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 22 Nov 2023 00:24:48 GMT
|
||||
* Dependencies: [@types/tern](https://npmjs.com/package/@types/tern)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [mihailik](https://github.com/mihailik), [nrbernard](https://github.com/nrbernard), [Pr1st0n](https://github.com/Pr1st0n), [rileymiller](https://github.com/rileymiller), [toddself](https://github.com/toddself), [ysulyma](https://github.com/ysulyma), [azoson](https://github.com/azoson), [kylesferrazza](https://github.com/kylesferrazza), [fityocsaba96](https://github.com/fityocsaba96), [koddsson](https://github.com/koddsson), and [ficristo](https://github.com/ficristo).
|
|
@ -0,0 +1,37 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface Editor {
|
||||
/** Tries to uncomment the current selection, and if that fails, line-comments it. */
|
||||
toggleComment(options?: CommentOptions): void;
|
||||
/** Set the lines in the given range to be line comments. Will fall back to `blockComment` when no line comment style is defined for the mode. */
|
||||
lineComment(from: Position, to: Position, options?: CommentOptions): void;
|
||||
/** Wrap the code in the given range in a block comment. Will fall back to `lineComment` when no block comment style is defined for the mode. */
|
||||
blockComment(from: Position, to: Position, options?: CommentOptions): void;
|
||||
/** Try to uncomment the given range. Returns `true` if a comment range was found and removed, `false` otherwise. */
|
||||
uncomment(from: Position, to: Position, options?: CommentOptions): boolean;
|
||||
}
|
||||
|
||||
interface CommentOptions {
|
||||
/** Override the [comment string properties](https://codemirror.net/doc/manual.html#mode_comment) of the mode with custom comment strings. */
|
||||
blockCommentStart?: string | undefined;
|
||||
/** Override the [comment string properties](https://codemirror.net/doc/manual.html#mode_comment) of the mode with custom comment strings. */
|
||||
blockCommentEnd?: string | undefined;
|
||||
/** Override the [comment string properties](https://codemirror.net/doc/manual.html#mode_comment) of the mode with custom comment strings. */
|
||||
blockCommentLead?: string | undefined;
|
||||
/** Override the [comment string properties](https://codemirror.net/doc/manual.html#mode_comment) of the mode with custom comment strings. */
|
||||
lineComment?: string | undefined;
|
||||
/** A string that will be inserted after opening and leading markers, and before closing comment markers. Defaults to a single space. */
|
||||
padding?: string | null | undefined;
|
||||
/** Whether, when adding line comments, to also comment lines that contain only whitespace. */
|
||||
commentBlankLines?: boolean | undefined;
|
||||
/** When adding line comments and this is turned on, it will align the comment block to the current indentation of the first line of the block. */
|
||||
indent?: boolean | undefined;
|
||||
/** When block commenting, this controls whether the whole lines are indented, or only the precise range that is given. Defaults to `true`. */
|
||||
fullLines?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface CommandActions {
|
||||
toggleComment(cm: Editor): void;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* if true, the editor will make the next line continue a comment when
|
||||
* pressing the Enter key. If set to a string, it will continue comments
|
||||
* using a custom shortcut.
|
||||
*/
|
||||
continueComments?: boolean | string | { key: string; continueLineComment?: boolean | undefined } | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
import "../../";
|
||||
|
||||
export type DialogCloseFunction = () => void;
|
||||
|
||||
export interface DialogOptions {
|
||||
bottom?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface OpenDialogOptions extends DialogOptions {
|
||||
/** If true, the dialog will be closed when the user presses enter in the input. Defaults to true. */
|
||||
closeOnEnter?: boolean | undefined;
|
||||
/** Determines whether the dialog is closed when it loses focus. Defaults to true. */
|
||||
closeOnBlur?: boolean | undefined;
|
||||
/** An event handler that will be called whenever keydown fires in the dialog's input. If the callback returns true, the dialog will not do any further processing of the event. */
|
||||
onKeyDown?(event: KeyboardEvent, value: string, close: DialogCloseFunction): boolean | undefined;
|
||||
/** An event handler that will be called whenever keyup fires in the dialog's input. If the callback returns true, the dialog will not do any further processing of the event. */
|
||||
onKeyUp?(event: KeyboardEvent, value: string, close: DialogCloseFunction): boolean | undefined;
|
||||
/** An event handler that will be called whenever input fires in the dialog's input. If the callback returns true, the dialog will not do any further processing of the event. */
|
||||
onInput?(event: KeyboardEvent, value: string, close: DialogCloseFunction): boolean | undefined;
|
||||
/** A callback that will be called after the dialog has been closed and removed from the DOM. */
|
||||
onClose?(instance: HTMLElement): void;
|
||||
}
|
||||
|
||||
export interface OpenNotificationOptions extends DialogOptions {
|
||||
duration?: number | undefined;
|
||||
}
|
||||
|
||||
declare module "../../" {
|
||||
interface Editor {
|
||||
/** Provides a very simple way to query users for text input. */
|
||||
openDialog(
|
||||
template: string | Node,
|
||||
callback: (value: string, e: Event) => void,
|
||||
options?: OpenDialogOptions,
|
||||
): DialogCloseFunction;
|
||||
openNotification(template: string | Node, options?: OpenNotificationOptions): DialogCloseFunction;
|
||||
openConfirm(
|
||||
template: string | Node,
|
||||
callbacks: ReadonlyArray<(editor: Editor) => void>,
|
||||
options?: DialogOptions,
|
||||
): DialogCloseFunction;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface EditorConfiguration {
|
||||
// if true, it will be refreshed the first time the editor becomes visible.
|
||||
// you can pass delay (msec) time as polling duration
|
||||
autoRefresh?: boolean | { delay: number } | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* When set to true, will make the editor full-screen (as in, taking up the whole browser window).
|
||||
* Depends on fullscreen.css
|
||||
* @see {@link https://codemirror.net/doc/manual.html#addon_fullscreen}
|
||||
* @default false
|
||||
*/
|
||||
fullScreen?: boolean | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface Panel {
|
||||
/** Removes the panel from the editor */
|
||||
clear(): void;
|
||||
/** Notifies panel that height of DOM node has changed */
|
||||
changed(height?: number): void;
|
||||
}
|
||||
|
||||
interface ShowPanelOptions {
|
||||
/**
|
||||
* Controls the position of the newly added panel. The following values are recognized:
|
||||
* `top` (default): Adds the panel at the very top.
|
||||
* `after-top`: Adds the panel at the bottom of the top panels.
|
||||
* `bottom`: Adds the panel at the very bottom.
|
||||
* `before-bottom`: Adds the panel at the top of the bottom panels.
|
||||
*/
|
||||
position?: "top" | "after-top" | "bottom" | "before-bottom" | undefined;
|
||||
/** The new panel will be added before the given panel. */
|
||||
before?: Panel | undefined;
|
||||
/** The new panel will be added after the given panel. */
|
||||
after?: Panel | undefined;
|
||||
/** The new panel will replace the given panel. */
|
||||
replace?: Panel | undefined;
|
||||
/** Whether to scroll the editor to keep the text's vertical position stable, when adding a panel above it. Defaults to false. */
|
||||
stable?: boolean | undefined;
|
||||
/** The initial height of the panel. Defaults to the offsetHeight of the node. */
|
||||
height?: number | undefined;
|
||||
}
|
||||
|
||||
interface Editor {
|
||||
/**
|
||||
* Places a DOM node above or below an editor and shrinks the editor to make room for the node.
|
||||
* When using the `after`, `before` or `replace` options, if the panel doesn't exists or has been removed, the value of the `position` option will be used as a fallback.
|
||||
* @param node the DOM node
|
||||
* @param options optional options object
|
||||
*/
|
||||
addPanel(node: HTMLElement, options?: ShowPanelOptions): Panel;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Adds a placeholder option that can be used to make content appear in the editor when it is empty and not focused.
|
||||
* It can hold either a string or a DOM node. Also gives the editor a CodeMirror-empty CSS class whenever it doesn't contain any text.
|
||||
*/
|
||||
placeholder?: string | Node | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import "../../";
|
||||
|
||||
export interface Ruler {
|
||||
column: number;
|
||||
className?: string | undefined;
|
||||
color?: string | undefined;
|
||||
lineStyle?: string | undefined;
|
||||
width?: string | undefined;
|
||||
}
|
||||
|
||||
declare module "../../" {
|
||||
interface EditorConfiguration {
|
||||
/** show one or more vertical rulers in the editor. */
|
||||
rulers?: false | ReadonlyArray<number | Ruler> | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface AutoCloseBrackets {
|
||||
/**
|
||||
* String containing pairs of matching characters.
|
||||
*/
|
||||
pairs?: string | undefined;
|
||||
|
||||
/**
|
||||
* If the next character is in the string, opening a bracket should be auto-closed.
|
||||
*/
|
||||
closeBefore?: string | undefined;
|
||||
|
||||
/**
|
||||
* String containing chars that could do a triple quote.
|
||||
*/
|
||||
triples?: string | undefined;
|
||||
|
||||
/**
|
||||
* explode should be a similar string that gives the pairs of characters that, when enter is pressed between them, should have the second character also moved to its own line.
|
||||
*/
|
||||
explode?: string | undefined;
|
||||
|
||||
/**
|
||||
* By default, if the active mode has a closeBrackets property, that overrides the configuration given in the option.
|
||||
* But you can add an override property with a truthy value to override mode-specific configuration.
|
||||
*/
|
||||
override?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Will auto-close brackets and quotes when typed.
|
||||
* By default, it'll auto-close ()[]{}''"", but you can pass it a string similar to that (containing pairs of matching characters),
|
||||
* or an object with pairs and optionally explode properties to customize it.
|
||||
*/
|
||||
autoCloseBrackets?: AutoCloseBrackets | boolean | string | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface CommandActions {
|
||||
closeTag(cm: Editor): void;
|
||||
}
|
||||
|
||||
interface AutoCloseTags {
|
||||
/**
|
||||
* Whether to autoclose when the '/' of a closing tag is typed. (default true)
|
||||
*/
|
||||
whenClosing?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Whether to autoclose the tag when the final '>' of an opening tag is typed. (default true)
|
||||
*/
|
||||
whenOpening?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* An array of tag names that should not be autoclosed. (default is empty tags for HTML, none for XML)
|
||||
*/
|
||||
dontCloseTags?: readonly string[] | undefined;
|
||||
|
||||
/**
|
||||
* An array of tag names that should, when opened, cause a
|
||||
* blank line to be added inside the tag, and the blank line and
|
||||
* closing line to be indented. (default is block tags for HTML, none for XML)
|
||||
*/
|
||||
indentTags?: readonly string[] | undefined;
|
||||
|
||||
/**
|
||||
* An array of XML tag names that should be autoclosed with '/>'. (default is none)
|
||||
*/
|
||||
emptyTags: readonly string[];
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Will auto-close XML tags when '>' or '/' is typed.
|
||||
* Depends on the fold/xml-fold.js addon.
|
||||
*/
|
||||
autoCloseTags?: AutoCloseTags | boolean | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface CommandActions {
|
||||
newlineAndIndentContinueMarkdownList(cm: Editor): void | typeof Pass;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface MatchBrackets {
|
||||
/**
|
||||
* Only use the character after the start position, never the one before it.
|
||||
*/
|
||||
afterCursor?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Causes only matches where both brackets are at the same side of the start position to be considered.
|
||||
*/
|
||||
strict?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Stop after scanning this amount of lines without a successful match. Defaults to 1000.
|
||||
*/
|
||||
maxScanLines?: number | undefined;
|
||||
|
||||
/**
|
||||
* Ignore lines longer than this. Defaults to 10000.
|
||||
*/
|
||||
maxScanLineLength?: number | undefined;
|
||||
|
||||
/**
|
||||
* Don't highlight a bracket in a line longer than this. Defaults to 1000.
|
||||
*/
|
||||
maxHighlightLineLength?: number | undefined;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
// When set to true or an options object, causes matching brackets to be highlighted whenever the cursor is next to them.
|
||||
matchBrackets?: MatchBrackets | boolean | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface CommandActions {
|
||||
/**
|
||||
* You can bind a key to in order to jump to the tag matching the one under the cursor.
|
||||
*/
|
||||
toMatchingTag(cm: Editor): void;
|
||||
}
|
||||
|
||||
interface MatchTags {
|
||||
/**
|
||||
* Highlight both matching tags.
|
||||
*/
|
||||
bothTags?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* When enabled will cause the tags around the cursor to be highlighted (using the CodeMirror-matchingtag class).
|
||||
* Depends on the addon/fold/xml-fold.js addon.
|
||||
*/
|
||||
matchTags?: MatchTags | boolean | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface EditorConfiguration {
|
||||
/** when enabled, adds the CSS class cm-trailingspace to stretches of whitespace at the end of lines. */
|
||||
showTrailingSpace?: boolean | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import "./foldcode";
|
||||
|
||||
declare module "./foldcode" {
|
||||
interface FoldHelpers {
|
||||
brace: FoldRangeFinder;
|
||||
import: FoldRangeFinder;
|
||||
include: FoldRangeFinder;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import "./foldcode";
|
||||
|
||||
declare module "./foldcode" {
|
||||
interface FoldHelpers {
|
||||
comment: FoldRangeFinder;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
// See docs https://codemirror.net/doc/manual.html#addon_foldcode
|
||||
|
||||
import * as CodeMirror from "../../";
|
||||
|
||||
export type FoldRangeFinder = (cm: CodeMirror.Editor, pos: CodeMirror.Position) => CodeMirror.FoldRange | undefined;
|
||||
|
||||
export interface FoldHelpers {
|
||||
combine: (...finders: FoldRangeFinder[]) => FoldRangeFinder;
|
||||
auto: FoldRangeFinder;
|
||||
}
|
||||
|
||||
declare module "../../" {
|
||||
interface Editor {
|
||||
/**
|
||||
* Helps with code folding. Adds a foldCode method to editor instances, which will try to do a code fold starting at the given line,
|
||||
* or unfold the fold that is already present.
|
||||
* The method takes as first argument the position that should be folded (may be a line number or a Pos), and as second optional argument either a
|
||||
* range-finder function, or an options object.
|
||||
*/
|
||||
foldCode: (
|
||||
lineOrPos: number | Position,
|
||||
rangeFindeOrFoldOptions?: FoldRangeFinder | FoldOptions,
|
||||
force?: "fold" | "unfold",
|
||||
) => void;
|
||||
isFolded(pos: Position): boolean | undefined;
|
||||
foldOption<K extends keyof FoldOptions>(option: K): FoldOptions[K];
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
foldOptions?: FoldOptions | undefined;
|
||||
}
|
||||
|
||||
interface FoldOptions {
|
||||
/**
|
||||
* The function that is used to find foldable ranges. If this is not directly passed, it will default to CodeMirror.fold.auto,
|
||||
* which uses getHelpers with a "fold" type to find folding functions appropriate for the local mode.
|
||||
* There are files in the addon/fold/ directory providing CodeMirror.fold.brace, which finds blocks in brace languages (JavaScript, C, Java, etc),
|
||||
* CodeMirror.fold.indent, for languages where indentation determines block structure (Python, Haskell), and CodeMirror.fold.xml, for XML-style languages,
|
||||
* and CodeMirror.fold.comment, for folding comment blocks.
|
||||
*/
|
||||
rangeFinder?: FoldRangeFinder | undefined;
|
||||
|
||||
/**
|
||||
* The widget to show for folded ranges. Can be either a string, in which case it'll become a span with class CodeMirror-foldmarker, or a DOM node.
|
||||
* To dynamically generate the widget, this can be a function that returns a string or DOM node, which will then render as described.
|
||||
* The function will be invoked with parameters identifying the range to be folded.
|
||||
*/
|
||||
widget?: string | Element | ((from: Position, to: Position) => string | Element) | undefined;
|
||||
|
||||
/**
|
||||
* When true (default is false), the addon will try to find foldable ranges on the lines above the current one if there isn't an eligible one on the given line.
|
||||
*/
|
||||
scanUp?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The minimum amount of lines that a fold should span to be accepted. Defaults to 0, which also allows single-line folds.
|
||||
*/
|
||||
minFoldSize?: number | undefined;
|
||||
|
||||
clearOnEnter?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface FoldRange {
|
||||
from: Position;
|
||||
to: Position;
|
||||
}
|
||||
|
||||
interface CommandActions {
|
||||
toggleFold(cm: Editor): void;
|
||||
fold(cm: Editor): void;
|
||||
unfold(cm: Editor): void;
|
||||
foldAll(cm: Editor): void;
|
||||
unfoldAll(cm: Editor): void;
|
||||
}
|
||||
|
||||
const fold: FoldHelpers;
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
// See docs https://codemirror.net/doc/manual.html#addon_foldgutter
|
||||
|
||||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Provides an option foldGutter, which can be used to create a gutter with markers indicating the blocks that can be folded.
|
||||
*/
|
||||
foldGutter?: boolean | FoldGutterOptions | undefined;
|
||||
}
|
||||
|
||||
interface FoldRange {
|
||||
from: Position;
|
||||
to: Position;
|
||||
}
|
||||
|
||||
interface FoldGutterOptions {
|
||||
/**
|
||||
* The CSS class of the gutter. Defaults to "CodeMirror-foldgutter". You will have to style this yourself to give it a width (and possibly a background).
|
||||
*/
|
||||
gutter?: string | undefined;
|
||||
|
||||
/**
|
||||
* A CSS class or DOM element to be used as the marker for open, foldable blocks. Defaults to "CodeMirror-foldgutter-open".
|
||||
*/
|
||||
indicatorOpen?: string | Element | undefined;
|
||||
|
||||
/**
|
||||
* A CSS class or DOM element to be used as the marker for folded blocks. Defaults to "CodeMirror-foldgutter-folded".
|
||||
*/
|
||||
indicatorFolded?: string | Element | undefined;
|
||||
|
||||
/*
|
||||
* The range-finder function to use when determining whether something can be folded.
|
||||
* When not given, CodeMirror.fold.auto will be used as default.
|
||||
*/
|
||||
rangeFinder?: (cm: Editor, pos: Position) => FoldRange | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import "./foldcode";
|
||||
|
||||
declare module "./foldcode" {
|
||||
interface FoldHelpers {
|
||||
indent: FoldRangeFinder;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import "./foldcode";
|
||||
|
||||
declare module "./foldcode" {
|
||||
interface FoldHelpers {
|
||||
markdown: FoldRangeFinder;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
import * as CodeMirror from "../../";
|
||||
import "./foldcode";
|
||||
|
||||
export interface XmlTag {
|
||||
from: CodeMirror.Position;
|
||||
to: CodeMirror.Position;
|
||||
tag: string;
|
||||
}
|
||||
|
||||
declare module "./foldcode" {
|
||||
interface FoldHelpers {
|
||||
xml: FoldRangeFinder;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "../../" {
|
||||
function findMatchingTag(
|
||||
cm: Editor,
|
||||
pos: Position,
|
||||
range: Range,
|
||||
): { open: XmlTag; close: XmlTag | null | undefined; at: "open" | "close" } | undefined;
|
||||
|
||||
function findEnclosingTag(
|
||||
cm: Editor,
|
||||
pos: Position,
|
||||
range: Range,
|
||||
tag: string,
|
||||
): { open: XmlTag; close: XmlTag } | undefined;
|
||||
|
||||
function scanForClosingTag(cm: Editor, pos: Position, name: string, end?: Position): XmlTag | null | undefined;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
import "./show-hint";
|
||||
|
||||
declare module "../../" {
|
||||
interface HintHelpers {
|
||||
anyword: HintFunction;
|
||||
}
|
||||
|
||||
interface ShowHintOptions {
|
||||
word?: RegExp | undefined;
|
||||
range?: number | undefined;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import "./show-hint";
|
||||
|
||||
declare module "../../" {
|
||||
interface HintHelpers {
|
||||
css: HintFunction;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import "./xml-hint";
|
||||
|
||||
declare module "../../" {
|
||||
interface HintHelpers {
|
||||
html: HintFunction;
|
||||
}
|
||||
|
||||
const htmlSchema: any;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
import "./show-hint";
|
||||
|
||||
declare module "../../" {
|
||||
interface HintHelpers {
|
||||
javascript: HintFunction;
|
||||
coffeescript: HintFunction;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
import "../../";
|
||||
|
||||
declare module "../../" {
|
||||
/**
|
||||
* Provides a framework for showing autocompletion hints. Defines editor.showHint, which takes an optional
|
||||
* options object, and pops up a widget that allows the user to select a completion. Finding hints is done with
|
||||
* a hinting functions (the hint option), which is a function that take an editor instance and options object,
|
||||
* and return a {list, from, to} object, where list is an array of strings or objects (the completions), and
|
||||
* from and to give the start and end of the token that is being completed as {line, ch} objects. An optional
|
||||
* selectedHint property (an integer) can be added to the completion object to control the initially selected hint.
|
||||
*/
|
||||
function showHint(cm: Editor, hinter?: HintFunction, options?: ShowHintOptions): void;
|
||||
|
||||
function on<T extends keyof CompletionEventMap>(hints: Hints, eventName: T, handler: CompletionEventMap[T]): void;
|
||||
function off<T extends keyof CompletionEventMap>(hints: Hints, eventName: T, handler: CompletionEventMap[T]): void;
|
||||
function signal<T extends keyof CompletionEventMap>(
|
||||
hints: Hints,
|
||||
eventName: T,
|
||||
...args: Parameters<CompletionEventMap[T]>
|
||||
): void;
|
||||
|
||||
interface CompletionEventMap {
|
||||
shown: () => void;
|
||||
select: (completion: Hint | string, element: Element) => void;
|
||||
pick: (completion: Hint | string) => void;
|
||||
close: () => void;
|
||||
}
|
||||
|
||||
interface Hints {
|
||||
from: Position;
|
||||
to: Position;
|
||||
list: Array<Hint | string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface used by showHint.js Codemirror add-on
|
||||
* When completions aren't simple strings, they should be objects with the following properties:
|
||||
*/
|
||||
interface Hint {
|
||||
text: string;
|
||||
className?: string | undefined;
|
||||
displayText?: string | undefined;
|
||||
from?: Position | undefined;
|
||||
/** Called if a completion is picked. If provided *you* are responsible for applying the completion */
|
||||
hint?: ((cm: Editor, data: Hints, cur: Hint) => void) | undefined;
|
||||
render?: ((element: HTMLLIElement, data: Hints, cur: Hint) => void) | undefined;
|
||||
to?: Position | undefined;
|
||||
}
|
||||
|
||||
interface EditorEventMap {
|
||||
startCompletion: (instance: Editor) => void;
|
||||
endCompletion: (instance: Editor) => void;
|
||||
}
|
||||
|
||||
interface Editor {
|
||||
showHint(options?: ShowHintOptions): void;
|
||||
closeHint(): void;
|
||||
}
|
||||
|
||||
interface CommandActions {
|
||||
/* An extension of the existing CodeMirror typings for the autocomplete command */
|
||||
autocomplete: typeof showHint;
|
||||
}
|
||||
|
||||
interface HintFunction {
|
||||
(cm: Editor, options: ShowHintOptions): Hints | null | undefined | PromiseLike<Hints | null | undefined>;
|
||||
}
|
||||
|
||||
interface AsyncHintFunction {
|
||||
(cm: Editor, callback: (hints: Hints | null | undefined) => void, options: ShowHintOptions): void;
|
||||
async: true;
|
||||
}
|
||||
|
||||
interface HintFunctionResolver {
|
||||
resolve(cm: Editor, post: Position): HintFunction | AsyncHintFunction;
|
||||
}
|
||||
|
||||
interface ShowHintOptions {
|
||||
completeSingle?: boolean | undefined;
|
||||
hint?: HintFunction | AsyncHintFunction | HintFunctionResolver | undefined;
|
||||
alignWithWord?: boolean | undefined;
|
||||
closeCharacters?: RegExp | undefined;
|
||||
closeOnPick?: boolean | undefined;
|
||||
closeOnUnfocus?: boolean | undefined;
|
||||
updateOnCursorActivity?: boolean | undefined;
|
||||
completeOnSingleClick?: boolean | undefined;
|
||||
container?: HTMLElement | null | undefined;
|
||||
customKeys?:
|
||||
| { [key: string]: ((editor: Editor, handle: CompletionHandle) => void) | string }
|
||||
| null
|
||||
| undefined;
|
||||
extraKeys?: { [key: string]: ((editor: Editor, handle: CompletionHandle) => void) | string } | null | undefined;
|
||||
scrollMargin?: number | undefined;
|
||||
paddingForScrollbar?: boolean | undefined;
|
||||
moveOnOverlap?: boolean | undefined;
|
||||
words?: readonly string[] | undefined; // used by fromList
|
||||
}
|
||||
|
||||
/** The Handle used to interact with the autocomplete dialog box. */
|
||||
interface CompletionHandle {
|
||||
moveFocus(n: number, avoidWrap: boolean): void;
|
||||
setFocus(n: number): void;
|
||||
menuSize(): number;
|
||||
length: number;
|
||||
close(): void;
|
||||
pick(): void;
|
||||
data: any;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
showHint?: boolean | undefined;
|
||||
hintOptions?: ShowHintOptions | undefined;
|
||||
}
|
||||
|
||||
interface HintHelpers {
|
||||
auto: HintFunctionResolver;
|
||||
fromList: HintFunction;
|
||||
}
|
||||
|
||||
const hint: HintHelpers;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
import "./show-hint";
|
||||
|
||||
declare module "../../" {
|
||||
interface HintHelpers {
|
||||
sql: HintFunction;
|
||||
}
|
||||
|
||||
interface SqlHintTable {
|
||||
columns: string[];
|
||||
}
|
||||
|
||||
interface ShowHintOptions {
|
||||
tables?:
|
||||
| ReadonlyArray<string | { text: string; columns: string[] }>
|
||||
| Record<string, string[] | { columns: string[] }>
|
||||
| undefined;
|
||||
defaultTable?: string | undefined;
|
||||
disableKeywords?: boolean | undefined;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue