“蓄谋”牌,判定区机制修改
This commit is contained in:
parent
07c3dbd6d4
commit
79be76e569
|
@ -1926,7 +1926,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
var trigger=event.getParent(2)._trigger;
|
||||
if(trigger.name=='phaseJudge'){
|
||||
trigger.untrigger();
|
||||
trigger.untrigger('currentOnly');
|
||||
trigger.cancelled=true;
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -66,6 +66,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
perfectPair:{},
|
||||
card:{
|
||||
xumou_jsrg:{
|
||||
type:'delay',
|
||||
allowDuplicate:true,
|
||||
blankCard:true,
|
||||
effect:function(){
|
||||
'step 0'
|
||||
var card=event.cards[0];
|
||||
player.chooseUseTarget(card,`蓄谋:是否使用${get.translation(card)}?`,`请选择要使用的目标。若不使用此牌,则判定区内的所有“蓄谋”牌都将被置入弃牌堆。`);
|
||||
'step 1'
|
||||
if(!result.bool){
|
||||
var cards=player.getCards('j',card=>{
|
||||
return (card.viewAs||card.name)=='xumou_jsrg';
|
||||
});
|
||||
if(cards.length>0) player.loseToDiscardpile(cards);
|
||||
}
|
||||
},
|
||||
},
|
||||
ying:{
|
||||
audio:true,
|
||||
fullskin:true,
|
||||
|
@ -6311,6 +6328,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
jsrg_fanjiangzhangda_prefix:'转',
|
||||
jsrgfushan:'负山',
|
||||
jsrgfushan_info:'出牌阶段开始时,所有其他角色可以依次交给你一张牌并令你此阶段使用【杀】的次数上限+1。此阶段结束时,若你使用【杀】的次数未达到上限且此阶段以此法交给你牌的角色均存活,你失去2点体力,否则你将手牌摸至体力上限。',
|
||||
|
||||
xumou_jsrg:'蓄谋',
|
||||
xumou_jsrg_info:'“蓄谋”牌可在判定区内重复存在。判定阶段开始时,你选择一项:⒈使用此牌对应的实体牌,然后本阶段不能再使用此牌名的牌;⒉将所有的“蓄谋”牌置入弃牌堆。',
|
||||
|
||||
jiangshanrugu_qi:'江山如故·起',
|
||||
jiangshanrugu_cheng:'江山如故·承',
|
||||
|
|
|
@ -1653,7 +1653,7 @@ export class Get extends Uninstantable {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (obj instanceof lib.element.Button) return 'button';
|
||||
if (obj instanceof lib.element.Button || obj instanceof HTMLDivElement && obj.classList.contains('button') ) return 'button';
|
||||
if (obj instanceof lib.element.Card) return 'card';
|
||||
if (obj instanceof lib.element.Player) return 'player';
|
||||
if (obj instanceof lib.element.Dialog) return 'dialog';
|
||||
|
@ -3319,7 +3319,12 @@ export class Get extends Uninstantable {
|
|||
}
|
||||
if (get.position(node) == 'j' && node.viewAs && node.viewAs != name) {
|
||||
uiintro.add(get.translation(node.viewAs));
|
||||
uiintro.add('<div class="text center">(' + get.translation(get.translation(node)) + ')</div>');
|
||||
var cardInfo = lib.card[node.viewAs], showCardIntro=true;
|
||||
if (cardInfo.blankCard) {
|
||||
var cardOwner = get.owner(node);
|
||||
if (cardOwner && !cardOwner.isUnderControl(true)) showCardIntro = false;
|
||||
}
|
||||
if (showCardIntro) uiintro.add('<div class="text center">(' + get.translation(get.translation(node)) + ')</div>');
|
||||
// uiintro.add(get.translation(node.viewAs)+'<br><div class="text center" style="padding-top:5px;">('+get.translation(node)+')</div>');
|
||||
uiintro.nosub = true;
|
||||
name = node.viewAs;
|
||||
|
|
|
@ -2646,8 +2646,9 @@ export const Content = {
|
|||
event.cards = player.getCards('j');
|
||||
if (!event.cards.length) event.finish();
|
||||
"step 1";
|
||||
if (cards.length && player.getCards('j').includes(cards[0])) {
|
||||
if (cards.length) {
|
||||
event.card = cards.shift();
|
||||
var cardName = event.card.viewAs || event.card.name, cardInfo=lib.card[cardName];
|
||||
if (event.card.classList.contains('removing')) {
|
||||
event.card.remove();
|
||||
delete event.card;
|
||||
|
@ -2657,21 +2658,26 @@ export const Content = {
|
|||
event.finish();
|
||||
return;
|
||||
}
|
||||
else if (cardInfo.noEffect || !player.getCards('j').includes(event.card)) {
|
||||
event.redo();
|
||||
}
|
||||
else {
|
||||
player.lose(event.card, 'visible', ui.ordering);
|
||||
player.$phaseJudge(event.card);
|
||||
event.cancelled = false;
|
||||
event.trigger('phaseJudge');
|
||||
var name = event.card.viewAs || event.card.name;
|
||||
player.popup(name, 'thunder');
|
||||
if (!lib.card[name].effect) {
|
||||
player.popup(cardName, 'thunder');
|
||||
if (!cardInfo.effect) {
|
||||
game.delay();
|
||||
event.redo();
|
||||
}
|
||||
else if (!lib.card[name].judge) {
|
||||
else if (!cardInfo.judge) {
|
||||
game.delay();
|
||||
event.nojudge = true;
|
||||
}
|
||||
else{
|
||||
event.nojudge = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else event.finish();
|
||||
|
@ -5193,7 +5199,27 @@ export const Content = {
|
|||
var title = event.dialog.add('<div class="text center" style="margin: 0px;">判定区</div>');
|
||||
title.style.margin = '0px';
|
||||
title.style.padding = '0px';
|
||||
event.dialog.add(js);
|
||||
var shown = js.filter(card => {
|
||||
var name = (card.viewAs || card.name), info = lib.card[name];
|
||||
if (!info || !info.blankCard) return true;
|
||||
return false;
|
||||
});
|
||||
if (shown.length < js.length) {
|
||||
var hidden = js.filter(card => !shown.includes(card));
|
||||
var buttons = ui.create.div('.buttons', event.dialog.content);
|
||||
event.dialog.buttons = event.dialog.buttons.concat(ui.create.buttons(shown, 'card', buttons));
|
||||
event.dialog.buttons = event.dialog.buttons.concat(ui.create.buttons(hidden, 'blank', buttons));
|
||||
if (event.dialog.forcebutton !== false) event.dialog.forcebutton = true;
|
||||
if (event.dialog.buttons.length > 3) {
|
||||
event.dialog.classList.remove('forcebutton-auto');
|
||||
}
|
||||
else if (!event.dialog.noforcebutton) {
|
||||
event.dialog.classList.add('forcebutton-auto');
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.dialog.add(js);
|
||||
}
|
||||
directh = false;
|
||||
}
|
||||
}
|
||||
|
@ -5348,7 +5374,27 @@ export const Content = {
|
|||
var title = event.dialog.add('<div class="text center" style="margin: 0px;">判定区</div>');
|
||||
title.style.margin = '0px';
|
||||
title.style.padding = '0px';
|
||||
event.dialog.add(js);
|
||||
var shown = js.filter(card => {
|
||||
var name = (card.viewAs || card.name), info = lib.card[name];
|
||||
if (!info || !info.blankCard) return true;
|
||||
return false;
|
||||
});
|
||||
if (shown.length < js.length) {
|
||||
var hidden = js.filter(card => !shown.includes(card));
|
||||
var buttons = ui.create.div('.buttons', event.dialog.content);
|
||||
event.dialog.buttons = event.dialog.buttons.concat(ui.create.buttons(shown, 'card', buttons));
|
||||
event.dialog.buttons = event.dialog.buttons.concat(ui.create.buttons(hidden, 'blank', buttons));
|
||||
if (event.dialog.forcebutton !== false) event.dialog.forcebutton = true;
|
||||
if (event.dialog.buttons.length > 3) {
|
||||
event.dialog.classList.remove('forcebutton-auto');
|
||||
}
|
||||
else if (!event.dialog.noforcebutton) {
|
||||
event.dialog.classList.add('forcebutton-auto');
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.dialog.add(js);
|
||||
}
|
||||
directh = false;
|
||||
}
|
||||
}
|
||||
|
@ -5528,7 +5574,27 @@ export const Content = {
|
|||
var title = event.dialog.add('<div class="text center" style="margin: 0px;">判定区</div>');
|
||||
title.style.margin = '0px';
|
||||
title.style.padding = '0px';
|
||||
event.dialog.add(js);
|
||||
var shown = js.filter(card => {
|
||||
var name = (card.viewAs || card.name), info = lib.card[name];
|
||||
if (!info || !info.blankCard) return true;
|
||||
return false;
|
||||
});
|
||||
if (shown.length < js.length) {
|
||||
var hidden = js.filter(card => !shown.includes(card));
|
||||
var buttons = ui.create.div('.buttons', event.dialog.content);
|
||||
event.dialog.buttons = event.dialog.buttons.concat(ui.create.buttons(shown, 'card', buttons));
|
||||
event.dialog.buttons = event.dialog.buttons.concat(ui.create.buttons(hidden, 'blank', buttons));
|
||||
if (event.dialog.forcebutton !== false) event.dialog.forcebutton = true;
|
||||
if (event.dialog.buttons.length > 3) {
|
||||
event.dialog.classList.remove('forcebutton-auto');
|
||||
}
|
||||
else if (!event.dialog.noforcebutton) {
|
||||
event.dialog.classList.add('forcebutton-auto');
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.dialog.add(js);
|
||||
}
|
||||
directh = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -749,6 +749,11 @@ export class GameEvent {
|
|||
// const doing=evt.doingList.find(doing=>doing.player==player);
|
||||
// if(doing) doing.todoList=[];
|
||||
}
|
||||
else if (all==='currentOnly'){
|
||||
if (evt && evt.doingList) {
|
||||
evt.doingList.forEach(doing => doing.todoList = []);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -5646,7 +5646,7 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
canAddJudge(card) {
|
||||
if (this.isDisabledJudge()) return false;
|
||||
var name;
|
||||
let name;
|
||||
if (typeof card == 'string') {
|
||||
name = card;
|
||||
}
|
||||
|
@ -5654,7 +5654,9 @@ export class Player extends HTMLDivElement {
|
|||
name = card.viewAs || card.name;
|
||||
}
|
||||
if (!name) return false;
|
||||
if (this.hasJudge(name)) return false;
|
||||
const cardInfo = lib.card[name];
|
||||
if(!cardInfo) return false;
|
||||
if (!cardInfo.allowDuplicate && this.hasJudge(name)) return false;
|
||||
if (this.isOut()) return false;
|
||||
var mod = game.checkMod(card, this, this, 'unchanged', 'targetEnabled', this);
|
||||
if (mod != 'unchanged') return mod;
|
||||
|
|
|
@ -9621,6 +9621,12 @@ class Create extends Uninstantable {
|
|||
blank: (item, type, position, noclick, node) => {
|
||||
node = ui.create.div('.button.card', position);
|
||||
node.link = item;
|
||||
if (get.position(item) == 'j' && item.viewAs && lib.config.cardtempname != 'off') {
|
||||
node.classList.add('infoflip');
|
||||
node.classList.add('infohidden')
|
||||
ui.create.cardTempName(item, node).style.setProperty('display','block','important')
|
||||
|
||||
}
|
||||
return node;
|
||||
},
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue