Merge pull request #953 from mengxinzxz/PR-Branch

bugfix
This commit is contained in:
Spmario233 2024-02-15 21:29:49 +08:00 committed by GitHub
commit 75d3c1580e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 23 additions and 23 deletions

View File

@ -1096,7 +1096,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var list=['cancel2']; var list=['cancel2'];
var choiceList=[ var choiceList=[
'令此【杀】可以额外指定一个目标', '令此【杀】可以额外指定一个目标',
'弃置一张手牌,若此【杀】造成伤害,则你摸一张牌且本阶段可以额外使用一张【杀】', '弃置'+get.translation(target)+'一张手牌,若此【杀】造成伤害,则你摸一张牌且本阶段可以额外使用一张【杀】',
]; ];
if(target.countCards('h')) list.unshift('其弃置'); if(target.countCards('h')) list.unshift('其弃置');
else choiceList[1]='<span style="opacity:0.5">'+choiceList[1]+'</span>'; else choiceList[1]='<span style="opacity:0.5">'+choiceList[1]+'</span>';
@ -1129,10 +1129,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
if(d1) return get.damageEffect(player,player,player)>0; if(d1) return get.damageEffect(player,player,player)>0;
return false; return false;
}()); }()).set('prompt','护众:是否摸一张牌并执行其中一项?');
'step 1' 'step 1'
if(result.control!='cancel2'){ if(result.control!='cancel2'){
player.logSkill('twhuzhong',target); player.logSkill('twhuzhong',target);
player.draw();
if(result.control=='其弃置'){ if(result.control=='其弃置'){
player.discardPlayerCard(target,'h',true); player.discardPlayerCard(target,'h',true);
player.when('useCardAfter').filter(evt=>evt==trigger.getParent()).then(()=>{ player.when('useCardAfter').filter(evt=>evt==trigger.getParent()).then(()=>{
@ -1144,19 +1145,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}); });
event.finish(); event.finish();
} }
else{
player.chooseTarget('请选择'+get.translation(trigger.card)+'的额外目标',function(card,player,target){
var trigger=_status.event.getTrigger();
return !trigger.targets.includes(target)&&player.canUse(trigger.card,target);
}).set('ai',function(target){
var player=_status.event.player;
var trigger=_status.event.getTrigger();
return get.effect(target,trigger.card,player,player);
});
}
} }
else event.finish(); else event.finish();
'step 2' 'step 2'
player.chooseTarget('请选择'+get.translation(trigger.card)+'的额外目标',function(card,player,target){
var trigger=_status.event.getTrigger();
return !trigger.targets.includes(target)&&player.canUse(trigger.card,target);
}).set('ai',function(target){
var player=_status.event.player;
var trigger=_status.event.getTrigger();
return get.effect(target,trigger.card,player,player);
});
'step 3'
if(result.bool){ if(result.bool){
player.line(result.targets); player.line(result.targets);
trigger.getParent().targets.addArray(result.targets); trigger.getParent().targets.addArray(result.targets);
@ -1180,7 +1180,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageBegin2',player:'damageBegin4'}, trigger:{source:'damageBegin2',player:'damageBegin4'},
filter:function(event,player,name){ filter:function(event,player,name){
if(name=='damageBegin2'){ if(name=='damageBegin2'){
return !event.hasNature()&&player.countCards('h')>event.player.countCards('h'); return !event.hasNature()&&player.countCards('h')>=event.player.countCards('h');
} }
return event.hasNature(); return event.hasNature();
}, },
@ -15995,9 +15995,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
twdanlie_info:'①出牌阶段限一次。你可以与至多三名其他角色共同拼点。若你赢你对没赢的角色依次造成1点伤害若你没赢你失去1点体力。②你的拼点牌点数+XX为你已损失的体力值。', twdanlie_info:'①出牌阶段限一次。你可以与至多三名其他角色共同拼点。若你赢你对没赢的角色依次造成1点伤害若你没赢你失去1点体力。②你的拼点牌点数+XX为你已损失的体力值。',
xia_zhangwei:'张葳', xia_zhangwei:'张葳',
twhuzhong:'护众', twhuzhong:'护众',
twhuzhong_info:'当你于出牌阶段使用无属性【杀】指定唯一目标角色时,你可以选择一项:①为此牌额外选择一个目标;②弃置其一张手牌,此牌结算完毕后,若此牌造成过伤害,则你摸一张牌且本阶段可以额外使用一张【杀】。', twhuzhong_info:'当你于出牌阶段使用无属性【杀】指定唯一目标角色时,你可以摸一张牌并选择一项:①为此牌额外选择一个目标;②弃置其一张手牌,此牌结算完毕后,若此牌造成过伤害,则你摸一张牌且本阶段可以额外使用一张【杀】。',
twfenwang:'焚亡', twfenwang:'焚亡',
twfenwang_info:'锁定技。①当你受到属性伤害时,你须弃置一张牌或令此伤害+1。②当你对其他角色造成非属性伤害时若你的手牌数大于其,则此伤害+1。', twfenwang_info:'锁定技。①当你受到属性伤害时,你须弃置一张牌或令此伤害+1。②当你对其他角色造成非属性伤害时若你的手牌数大于等于其,则此伤害+1。',
xia_xiahousone:'夏侯子萼', xia_xiahousone:'夏侯子萼',
twchengxi:'承袭', twchengxi:'承袭',
twchengxi_info:'出牌阶段每名角色限一次,你可以摸一张牌并与一名其他角色拼点。若你赢,你使用的下一张基本牌或非延时锦囊牌结算完毕后,你视为对原目标使用一张无次数限制的同名牌;若你没赢,其视为对你使用一张无距离限制的【杀】。', twchengxi_info:'出牌阶段每名角色限一次,你可以摸一张牌并与一名其他角色拼点。若你赢,你使用的下一张基本牌或非延时锦囊牌结算完毕后,你视为对原目标使用一张无次数限制的同名牌;若你没赢,其视为对你使用一张无距离限制的【杀】。',

View File

@ -16,7 +16,7 @@ import {
createMenu, createMenu,
createConfig createConfig
} from "../index.js"; } from "../index.js";
import { ui, game, get, lib, _status } from "../../../../../noname.js"; import { ui, game, get, ai, lib, _status } from "../../../../../noname.js";
export const cardPackMenu = function (connectMenu) { export const cardPackMenu = function (connectMenu) {
/** /**

View File

@ -16,7 +16,7 @@ import {
createMenu, createMenu,
createConfig createConfig
} from "../index.js"; } from "../index.js";
import { ui, game, get, lib, _status } from "../../../../../noname.js"; import { ui, game, get, ai, lib, _status } from "../../../../../noname.js";
export const characterPackMenu = function (connectMenu) { export const characterPackMenu = function (connectMenu) {
/** /**

View File

@ -16,7 +16,7 @@ import {
createMenu, createMenu,
createConfig createConfig
} from "../index.js"; } from "../index.js";
import { ui, game, get, lib, _status } from "../../../../../noname.js"; import { ui, game, get, ai, lib, _status } from "../../../../../noname.js";
import { nonameInitialized } from "../../../../util/index.js"; import { nonameInitialized } from "../../../../util/index.js";
export const extensionMenu = function (connectMenu) { export const extensionMenu = function (connectMenu) {
@ -1551,7 +1551,7 @@ export const extensionMenu = function (connectMenu) {
} }
else { else {
if (!window.CodeMirror) { if (!window.CodeMirror) {
import('../../game/codemirror.js').then(() => { import('../../../../../game/codemirror.js').then(() => {
lib.codeMirrorReady(node, editor); lib.codeMirrorReady(node, editor);
}); });
lib.init.css(lib.assetURL + 'layout/default', 'codemirror'); lib.init.css(lib.assetURL + 'layout/default', 'codemirror');
@ -1989,7 +1989,7 @@ export const extensionMenu = function (connectMenu) {
} }
else { else {
if (!window.CodeMirror) { if (!window.CodeMirror) {
import('../../game/codemirror.js').then(() => { import('../../../../../game/codemirror.js').then(() => {
lib.codeMirrorReady(node, editor); lib.codeMirrorReady(node, editor);
}); });
lib.init.css(lib.assetURL + 'layout/default', 'codemirror'); lib.init.css(lib.assetURL + 'layout/default', 'codemirror');
@ -2369,7 +2369,7 @@ export const extensionMenu = function (connectMenu) {
} }
else { else {
if (!window.CodeMirror) { if (!window.CodeMirror) {
import('../../game/codemirror.js').then(() => { import('../../../../../game/codemirror.js').then(() => {
lib.codeMirrorReady(node, this.editor); lib.codeMirrorReady(node, this.editor);
}); });
lib.init.css(lib.assetURL + 'layout/default', 'codemirror'); lib.init.css(lib.assetURL + 'layout/default', 'codemirror');

View File

@ -16,7 +16,7 @@ import {
createMenu, createMenu,
createConfig createConfig
} from "../index.js"; } from "../index.js";
import { ui, game, get, lib, _status } from "../../../../../noname.js"; import { ui, game, get, ai, lib, _status } from "../../../../../noname.js";
import { nonameInitialized } from "../../../../util/index.js"; import { nonameInitialized } from "../../../../util/index.js";
export const optionsMenu = function (connectMenu) { export const optionsMenu = function (connectMenu) {

View File

@ -16,7 +16,7 @@ import {
createMenu, createMenu,
createConfig createConfig
} from "../index.js"; } from "../index.js";
import { ui, game, get, lib, _status } from "../../../../../noname.js"; import { ui, game, get, ai, lib, _status } from "../../../../../noname.js";
export const startMenu = function (connectMenu) { export const startMenu = function (connectMenu) {
/** /**