Merge pull request #824 from universe-st/PR-Branch-fixsilent

为全局技能添加silent标签
This commit is contained in:
Spmario233 2024-01-20 14:14:47 +08:00 committed by GitHub
commit 9ff5e65cce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View File

@ -2679,6 +2679,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
priority:5, priority:5,
popup:false, popup:false,
forced:true, forced:true,
silent:true,
filter:function(event,player){ filter:function(event,player){
if(event.card.storage&&event.card.storage.nowuxie) return false; if(event.card.storage&&event.card.storage.nowuxie) return false;
var card=event.card; var card=event.card;

View File

@ -2030,10 +2030,10 @@ export const Content = {
} }
else { else {
event.choice = usableSkills.filter(n => n.priority == usableSkills[0].priority); event.choice = usableSkills.filter(n => n.priority == usableSkills[0].priority);
//现在只要找到一个同优先度技能为silent 便优先执行该技能 //现在只要找到一个同优先度技能为silent,或没有技能描述的技能 便优先执行该技能
const silentSkill = event.choice.find(item => { const silentSkill = event.choice.find(item => {
const skillInfo = lib.skill[item.skill]; const skillInfo = lib.skill[item.skill];
return (skillInfo && skillInfo.silent); return (skillInfo && (skillInfo.silent || !lib.translate[item.skill]));
}) })
if (silentSkill){ if (silentSkill){
event.current = silentSkill; event.current = silentSkill;

View File

@ -11228,6 +11228,7 @@ export class Library extends Uninstantable {
charlotte: true, charlotte: true,
priority: -100, priority: -100,
lastDo: true, lastDo: true,
silent:true,
content: function () { content: function () {
player.removeSkill('counttrigger'); player.removeSkill('counttrigger');
delete player.storage.counttrigger; delete player.storage.counttrigger;
@ -11253,6 +11254,7 @@ export class Library extends Uninstantable {
priority: 100, priority: 100,
firstDo: true, firstDo: true,
popup: false, popup: false,
silent:true,
filter: function (event, player) { filter: function (event, player) {
return player.hp >= player.maxHp; return player.hp >= player.maxHp;
}, },
@ -11341,6 +11343,7 @@ export class Library extends Uninstantable {
popup: false, popup: false,
priority: -100, priority: -100,
lastDo: true, lastDo: true,
silent:true,
filter: function (event) { filter: function (event) {
return !event._cleared && event.card.name != 'wuxie'; return !event._cleared && event.card.name != 'wuxie';
}, },
@ -11357,6 +11360,7 @@ export class Library extends Uninstantable {
popup: false, popup: false,
priority: -100, priority: -100,
lastDo: true, lastDo: true,
silent:true,
filter: function (event) { filter: function (event) {
return ui.todiscard[event.discardid] ? true : false; return ui.todiscard[event.discardid] ? true : false;
}, },
@ -11386,6 +11390,7 @@ export class Library extends Uninstantable {
priority: 5, priority: 5,
forced: true, forced: true,
popup: false, popup: false,
silent:true,
filter: function (event, player) { filter: function (event, player) {
//if(!event.player.isDying()) return false; //if(!event.player.isDying()) return false;
//if(event.source&&event.source.isIn()&&event.source!=player) return false; //if(event.source&&event.source.isIn()&&event.source!=player) return false;
@ -11539,6 +11544,7 @@ export class Library extends Uninstantable {
popup: false, popup: false,
logv: false, logv: false,
forceDie: true, forceDie: true,
silent:true,
//priority:-5, //priority:-5,
content: function () { content: function () {
"step 0"; "step 0";
@ -11567,6 +11573,7 @@ export class Library extends Uninstantable {
forced: true, forced: true,
popup: false, popup: false,
forceDie: true, forceDie: true,
silent:true,
filter: function (event, player) { filter: function (event, player) {
var evt = event.getParent(); var evt = event.getParent();
return evt && evt.name == 'damage' && evt.hasNature('linked') && player.isLinked(); return evt && evt.name == 'damage' && evt.hasNature('linked') && player.isLinked();