Merge pull request #1415 from PZ157/PR-Branch

细节微调
This commit is contained in:
Spmario233 2024-06-01 17:35:40 +08:00 committed by GitHub
commit 04ee0c519a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 264 additions and 184 deletions

View File

@ -1420,6 +1420,7 @@ const skills = {
delete event.result.skill;
},
ai: {
combo: "clanzhongliu",
order(item, player) {
player = player || _status.event.player;
var storage = _status.event.player.storage.clanjiexuan;

View File

@ -1992,7 +1992,17 @@ const skills = {
},
},
ai: {
combo: "dctuoyu",
effect: {
player(card, player, target) {
if (
!get.tag(card, "damage") ||
player.countMark("dcxianjin") % 2 ||
!player.hasSkillTag("jueqing", false, target)
) return;
if (player.isMaxHandcard()) return [1, 1];
return [1, Math.min(3, 1 + player.getStorage("dctuoyu").length)];
}
}
},
},
dcqijing: {
@ -5772,7 +5782,7 @@ const skills = {
if (!target.hasFriend()) return;
let rec = get.tag(card, "recover"), damage = get.tag(card, "damage");
if (!rec && !damage) return;
if (damage && player.hasSkillTag("jueqing", null, target)) return 1.7;
if (damage && player.hasSkillTag("jueqing", false, target)) return 1.7;
let die = [null, 1],
temp;
game.filterPlayer(i => {

View File

@ -10352,6 +10352,9 @@ const skills = {
},
},
},
ai: {
combo: "zhishi"
},
},
zhishi: {
audio: 2,

View File

@ -1835,6 +1835,9 @@ const skills = {
},
},
},
ai: {
combo: "jsrgjinfa"
},
},
jsrgxuanfeng: {
audio: 2,
@ -1867,6 +1870,7 @@ const skills = {
},
ai: {
order: 2,
combo: "jsrgjinfa"
},
},
//陆逊
@ -2921,6 +2925,9 @@ const skills = {
}
player.logSkill("jsrgbazheng", dissident);
},
ai: {
combo: "jsrgyaoyan"
},
},
//刘永
jsrgdanxin: {
@ -9399,6 +9406,9 @@ const skills = {
target.damage();
}
},
ai: {
combo: "jsrgshelun"
},
},
jsrgtushe: {
audio: "xinfu_tushe",

View File

@ -8635,6 +8635,16 @@ const skills = {
},
},
riki_nvzhuang: {
init(player) {
if (get.character(player.name1, 3).includes("riki_nvzhuang")) {
player.storage.riki_nvzhuang = player.sex;
if (player.sex === "male") player.sex = "double";
else player.sex = "female";
}
},
onremove(player) {
if (player.storage.riki_nvzhuang) player.sex = player.storage.riki_nvzhuang;
},
trigger: { player: "phaseJieshuBegin" },
forced: true,
content() {

View File

@ -1379,6 +1379,9 @@ const skills = {
async content(event, trigger, player) {
trigger.num++;
},
ai: {
combo: "zhoulin"
},
},
zhoulin: {
audio: 2,
@ -8387,62 +8390,6 @@ const skills = {
}
},
},
//新华歆
yuanqing: {
audio: 2,
trigger: { player: "phaseUseEnd" },
forced: true,
filter: function (event, player) {
return player.hasHistory("useCard", function (evt) {
return evt.getParent("phaseUse") == event;
});
},
content: function () {
var map = {},
cards = [];
player.getHistory("useCard", function (evt) {
if (evt.getParent("phaseUse") == trigger) {
var type = get.type2(evt.card, false);
if (!map[type]) map[type] = [];
}
});
for (var i = 0; i < ui.discardPile.childNodes.length; i++) {
var card = ui.discardPile.childNodes[i],
type = get.type2(card, false);
if (map[type]) map[type].push(card);
}
for (var i in map) {
if (map[i].length) cards.push(map[i].randomGet());
}
if (cards.length) {
player.$gain2(cards, false);
game.cardsGotoSpecial(cards, "toRenku");
game.log(player, "将", cards, "置入了仁库");
game.delayx();
}
},
init: function (player) {
player.storage.renku = true;
},
},
shuchen: {
audio: 2,
init: function (player) {
player.storage.renku = true;
},
trigger: { global: "dying" },
forced: true,
filter: function (event, player) {
return _status.renku.length > 3;
},
logTarget: "player",
content: function () {
player.gain(_status.renku, "gain2", "fromRenku");
_status.renku.length = 0;
game.updateRenku();
trigger.player.recover();
},
},
//谯周
zhiming: {
audio: 2,

View File

@ -32,7 +32,7 @@ const translates = {
kuangcai: "狂才",
kuangcai_info: "出牌阶段开始时你可以令你此阶段内的主动出牌时间变为5秒。若如此做你于此阶段内使用牌没距离和次数限制且每当你于此阶段内使用牌时你摸一张牌且主动出牌时间-1秒。若主动出牌时间减至0则你结束出牌阶段。",
shejian: "舌剑",
shejian_info: "弃牌阶段结束时,若你于此阶段弃置的所有牌花色均不相同,则你可以弃置一名其他角色的一张牌。",
shejian_info: "弃牌阶段结束时,若你于此阶段弃置过至少两张牌且这些牌花色均不相同,则你可以弃置一名其他角色的一张牌。",
xinfu_daigong: "怠攻",
xinfu_daigong_info: "每回合限一次。当你受到伤害时,你可以展示所有手牌,然后令伤害来源选择一项:交给你一张与你所有手牌花色均不相同的一张牌,或防止此伤害。",
xinfu_zhaoxin: "昭心",

View File

@ -845,8 +845,6 @@ const skills = {
var go = false,
d1 = false;
if (get.attitude(player, trigger.player) > 0) {
d1 = true;
if (trigger.player.hasSkill("jueqing") || trigger.player.hasSkill("gangzhi")) d1 = false;
for (var target of trigger.targets) {
if (
!target.mayHaveShan(
@ -866,15 +864,17 @@ const skills = {
true
)
) {
if (!target.hasSkill("gangzhi")) d1 = false;
if (
target.hasSkillTag("filterDamage", null, {
get.attitude(player, target) < 0 &&
!trigger.player.hasSkillTag("jueqing", false, target) &&
!target.hasSkillTag("filterDamage", null, {
player: trigger.player,
card: trigger.card,
}) ||
get.attitude(player, target) >= 0
)
d1 = false;
})
) {
d1 = true;
break;
}
}
}
if (trigger.addCount === false || !trigger.player.isPhaseUsing()) go = false;
@ -4374,61 +4374,46 @@ const skills = {
intro: {
content: "limited",
},
direct: true,
content: function () {
"step 0";
player
.chooseTarget(get.prompt2("yjyongdi"), function (card, player, target) {
return target.hasSex("male") || target.name == "key_yuri";
})
.set("ai", function (target) {
async cost(event, trigger, player) {
event.result = await player
.chooseTarget(
get.prompt2("yjyongdi"),
(card, player, target) => {
return target.hasSex("male") || target.name == "key_yuri";
}
)
.set("ai", target => {
if (!_status.event.goon) return 0;
var player = _status.event.player;
var att = get.attitude(player, target);
if (att <= 1) return 0;
var mode = get.mode();
if (mode == "identity" || (mode == "versus" && _status.mode == "four")) {
if (target.name && lib.character[target.name]) {
for (var i = 0; i < lib.character[target.name][3].length; i++) {
if (lib.skill[lib.character[target.name][3][i]].zhuSkill) {
return att * 2;
}
}
}
if (target.getStockSkills(true, true).some(i => {
if (target.hasSkill(i)) return false;
let info = get.info(i);
return info && info.zhuSkill;
})) return att * 2;
}
return att;
})
.set("goon", !player.hasUnknown());
"step 1";
if (result.bool) {
player.awakenSkill("yjyongdi");
player.logSkill("yjyongdi", result.targets);
var target = result.targets[0];
target.gainMaxHp(true);
target.recover();
var mode = get.mode();
if (mode == "identity" || (mode == "versus" && _status.mode == "four") || mode == "doudizhu") {
if (target.name && lib.character[target.name]) {
var skills = lib.character[target.name][3];
target.storage.zhuSkill_yjyongdi = [];
for (var i = 0; i < skills.length; i++) {
var info = lib.skill[skills[i]];
if (info.zhuSkill) {
target.storage.zhuSkill_yjyongdi.push(skills[i]);
if (info.init) {
info.init(target);
}
if (info.init2) {
info.init2(target);
}
}
}
}
}
}
.set("goon", !player.hasUnknown())
.forResult();
},
ai: {
expose: 0.2,
async content(event, trigger, player) {
player.awakenSkill("yjyongdi");
let target = event.targets[0], mode = get.mode();
if (player !== target && (mode !== "identity" || player.identity !== "nei")) player.addExpose(0.3);
target.gainMaxHp(true);
target.recover();
if (mode == "identity" || (mode == "versus" && _status.mode == "four") || mode == "doudizhu") {
let skills = target.getStockSkills(true, true).filter(i => {
if (target.hasSkill(i)) return false;
let info = get.info(i);
return info && info.zhuSkill;
});
if (skills.length) target.addSkills(skills);
}
},
},
//用间篇豪华版盒子许攸
@ -5037,6 +5022,9 @@ const skills = {
player.gift(result.cards, target);
}
},
ai: {
combo: "yixiandao"
},
},
yjyibing: {
trigger: {

View File

@ -869,7 +869,7 @@ const skills = {
true
)
) {
if (player.hasSkill("jueqing") || target.hasSkill("gangzhi")) extra_num--;
if (player.hasSkillTag("jueqing", false, target)) extra_num--;
else if (
target.hasSkillTag("filterDamage", null, {
player: event.player,
@ -1049,7 +1049,6 @@ const skills = {
}
}
},
ai: { combo: "olsbyufeng" },
},
//界高顺
olxianzhen: {

View File

@ -335,7 +335,6 @@ const skills = {
}
return bool;
},
ai: { combo: "rejijun" },
},
//界司马朗
requji: {
@ -3200,7 +3199,7 @@ const skills = {
threaten: 0.9,
effect: {
target: function (card, player, target) {
if (player.hasSkillTag("jueqing")) return;
if (player.hasSkillTag("jueqing", false, target)) return;
if (target.hujia) return;
if (player._shibei_tmp) return;
if (target.hasSkill("shibei_ai")) return;
@ -9793,6 +9792,9 @@ const skills = {
player.recover();
player.draw();
},
ai: {
combo: "rejiushi"
},
},
rejiushi: {
audio: 2,
@ -12843,8 +12845,8 @@ const skills = {
ai: {
effect: {
target: (card, player, target) => {
if (typeof card !== "object" || !get.tag(card, "damage") || target.hasSkill("gangzhi")) return;
if (player.hasSkillTag("jueqing", null, true)) return;
if (typeof card !== "object" || !get.tag(card, "damage")) return;
if (player.hasSkillTag("jueqing", false, target)) return;
if (get.color(card) === "red") return [1, 0, 1, 0.6];
return [1, 0.6];
},

View File

@ -379,6 +379,9 @@ const skills = {
},
},
},
ai: {
combo: "sbqiaomeng"
},
},
sbqiaomeng: {
audio: 2,
@ -434,6 +437,9 @@ const skills = {
if (num > 0) player.addMark("charge", num);
}
},
ai: {
combo: "sbyicong"
},
},
//高顺
sbxianzhen: {
@ -6279,6 +6285,7 @@ const skills = {
});
},
ai: {
combo: "sbjushou",
order: 8,
result: {
target: -1,
@ -6975,6 +6982,9 @@ const skills = {
},
},
},
ai: {
combo: "sbliangzhu"
},
},
sbliangzhu: {
audio: 2,
@ -7178,6 +7188,9 @@ const skills = {
player.addSkills("sbduojing");
player.storage.sbkeji = true;
},
ai: {
combo: "sbkeji"
},
},
sbduojing: {
audio: 2,
@ -7252,7 +7265,10 @@ const skills = {
} else player.removeSkill("sbxiayuan_round");
},
subSkill: { round: { charlotte: true } },
ai: { expose: 0.2 },
ai: {
combo: "sbjieyue",
expose: 0.2
},
},
sbjieyue: {
audio: 4,

View File

@ -4001,6 +4001,9 @@ const skills = {
content: function () {
game.cardsGotoSpecial(get.cards(), "toRenku");
},
ai: {
combo: "spsongshu"
},
},
spsongshu: {
audio: 2,
@ -4042,6 +4045,9 @@ const skills = {
intro: { content: "不能对其他角色使用牌" },
},
},
ai: {
combo: "gebo"
},
},
//张机
jishi: {
@ -4079,6 +4085,9 @@ const skills = {
},
},
},
ai: {
combo: "binglun"
},
},
xinliaoyi: {
audio: "liaoyi",
@ -4294,6 +4303,7 @@ const skills = {
},
},
ai: {
combo: "jishi",
order: 2,
result: {
player: 1,
@ -5059,6 +5069,67 @@ const skills = {
onremove: true,
intro: { content: "已对$发动过此技能" },
},
yuanqing: {
audio: 2,
trigger: { player: "phaseUseEnd" },
forced: true,
filter: function (event, player) {
return player.hasHistory("useCard", function (evt) {
return evt.getParent("phaseUse") == event;
});
},
content: function () {
var map = {},
cards = [];
player.getHistory("useCard", function (evt) {
if (evt.getParent("phaseUse") == trigger) {
var type = get.type2(evt.card, false);
if (!map[type]) map[type] = [];
}
});
for (var i = 0; i < ui.discardPile.childNodes.length; i++) {
var card = ui.discardPile.childNodes[i],
type = get.type2(card, false);
if (map[type]) map[type].push(card);
}
for (var i in map) {
if (map[i].length) cards.push(map[i].randomGet());
}
if (cards.length) {
player.$gain2(cards, false);
game.cardsGotoSpecial(cards, "toRenku");
game.log(player, "将", cards, "置入了仁库");
game.delayx();
}
},
init: function (player) {
player.storage.renku = true;
},
ai: {
combo: "shuchen"
},
},
shuchen: {
audio: 2,
init: function (player) {
player.storage.renku = true;
},
trigger: { global: "dying" },
forced: true,
filter: function (event, player) {
return _status.renku.length > 3;
},
logTarget: "player",
content: function () {
player.gain(_status.renku, "gain2", "fromRenku");
_status.renku.length = 0;
game.updateRenku();
trigger.player.recover();
},
ai: {
combo: "yuanqing"
},
},
hxrenshi: {
audio: 2,
enable: "phaseUse",

View File

@ -54,7 +54,7 @@ const translates = {
mjchenshi: "陈势",
mjchenshi_player: "陈势",
mjchenshi_target: "陈势",
mjchenshi_info: "当有角色使用【兵临城下】指定第一个目标后,其可交给你一张牌,并将牌堆顶三张牌中所有不为【杀】的牌置入弃牌堆;当有角色成为【兵临城下】的目标后,其可交给你一张牌,然后将牌堆顶三张牌中所有的【杀】置入弃牌堆。",
mjchenshi_info: "当有角色使用【兵临城下】指定第一个目标后,其可交给你一张牌,并将牌堆顶三张牌中所有不为【杀】的牌置入弃牌堆;当有角色成为【兵临城下】的目标后,其可交给你一张牌,然后将牌堆顶三张牌中所有的【杀】置入弃牌堆。",
mjmouzhi: "谋识",
mjmouzhi_info: "锁定技,当你受到伤害时,若伤害渠道对应的牌和你上次受到的伤害花色相同,则你防止此伤害。",
luotong: "手杀骆统",

View File

@ -2054,6 +2054,9 @@ const skills = {
)
await player.recover(cards.length);
},
ai: {
combo: "olgongjie"
},
},
//OL飞扬
olfeiyang: {
@ -21298,49 +21301,46 @@ const skills = {
animationColor: "thunder",
skillAnimation: "legend",
mark: true,
direct: true,
content: function () {
"step 0";
player
.chooseTarget(get.prompt2("yongdi"), function (card, player, target) {
return (target.hasSex("male") || target.name == "key_yuri") && target != player;
})
.set("ai", function (target) {
async cost(event, trigger, player) {
event.result = await player
.chooseTarget(
get.prompt2("yongdi"),
(card, player, target) => {
if (player === target) return false;
return target.hasSex("male") || target.name == "key_yuri";
}
)
.set("ai", target => {
if (!_status.event.goon) return 0;
var player = _status.event.player;
var att = get.attitude(player, target);
let player = _status.event.player;
let att = get.attitude(player, target);
if (att <= 1) return 0;
var mode = get.mode();
let mode = get.mode();
if (mode == "identity" || (mode == "versus" && (_status.mode == "four" || _status.mode == "guandu"))) {
if (target.name && lib.character[target.name]) {
for (var i = 0; i < lib.character[target.name][3].length; i++) {
if (lib.skill[lib.character[target.name][3][i]].zhuSkill) {
return att * 2;
}
}
}
if (target.getStockSkills(true, true).some(i => {
if (target.hasSkill(i)) return false;
let info = get.info(i);
return info && info.zhuSkill;
})) return att * 2;
}
return att;
})
.set("goon", !player.hasUnknown());
"step 1";
if (result.bool) {
var target = result.targets[0];
player.logSkill("yongdi", target);
player.awakenSkill("yongdi");
target.gainMaxHp();
target.recover();
var skills = target.getStockSkills(true, true).filter(skill => {
if (target.hasSkill(skill)) return false;
var info = get.info(skill);
return info && info.zhuSkill;
});
if (skills.length) {
target.addSkills(skills);
}
}
.set("goon", !player.hasUnknown())
.forResult();
},
async content(event, trigger, player) {
player.awakenSkill("yongdi");
let target = event.targets[0], mode = get.mode();
if (mode !== "identity" || player.identity !== "nei") player.addExpose(0.25);
target.gainMaxHp();
target.recover();
let skills = target.getStockSkills(true, true).filter(skill => {
if (target.hasSkill(skill)) return false;
let info = get.info(skill);
return info && info.zhuSkill;
});
if (skills.length) target.addSkills(skills);
},
ai: { expose: 0.2 },
},
regushe: {
audio: "gushe",

View File

@ -8688,6 +8688,31 @@ const skills = {
ai: {
jueqing: true,
},
init(player) {
game.addGlobalSkill("gangzhi_jueqing");
},
onremove(player) {
game.removeGlobalSkill("gangzhi_jueqing");
},
subSkill: {
jueqing: {
trigger: {player: "dieAfter"},
filter(event, player) {
return !game.hasPlayer(cur => cur.hasSkill("gangzhi"));
},
silent: true,
forceDie: true,
content() {
game.removeGlobalSkill("gangzhi_jueqing");
},
ai: {
jueqing: true,
skillTagFilter(player, tag, arg) {
if (tag === "jueqing") return arg && arg.hasSkill("gangzhi");
}
}
}
},
},
beizhan: {
trigger: { player: "phaseJieshuBegin" },

View File

@ -237,6 +237,9 @@ const skills = {
player.popup("盗书");
game.log(player, "重置了技能", "#g【盗书】");
},
ai: {
combo: "stddaoshu"
},
},
//周处
stdxiongxia: {
@ -493,7 +496,7 @@ const skills = {
threaten: 0.9,
effect: {
target: function (card, player, target) {
if (player.hasSkillTag("jueqing")) return;
if (player.hasSkillTag("jueqing", false, target)) return;
if (player._stdjinjian_tmp) return;
const count = player.storage.counttrigger;
if (count && count.stdjinjian_player && count.stdjinjian_player > 0) return;

View File

@ -1942,8 +1942,7 @@ const skills = {
.set(
"goon",
(function () {
var d1 = true;
if (player.hasSkill("jueqing") || player.hasSkill("gangzhi")) d1 = false;
var d1 = false;
if (
!target.mayHaveShan(
player,
@ -1962,15 +1961,7 @@ const skills = {
true
)
) {
if (!target.hasSkill("gangzhi")) d1 = false;
if (
!target.hasSkillTag("filterDamage", null, {
player: player,
card: trigger.card,
}) &&
get.attitude(player, target) < 0
)
return true;
if (get.attitude(player, target) < 0 && !player.hasSkillTag("jueqing", false, target)) return true;
}
if (d1) return get.damageEffect(player, player, player) > 0;
return false;
@ -3258,7 +3249,7 @@ const skills = {
player.addMark("twshoushou_plus", 1, false);
},
ai: {
halfneg: true,
neg: true,
},
subSkill: {
damage: {
@ -4355,6 +4346,7 @@ const skills = {
target.damage();
},
ai: {
combo: "twjuntun",
expose: 0.25,
order: 8,
result: {
@ -4439,6 +4431,9 @@ const skills = {
},
},
},
ai: {
combo: "twjuntun"
},
},
//蒋济
twjichou: {
@ -13716,8 +13711,6 @@ const skills = {
"goon",
(function () {
if (get.attitude(target, player) < 0) return false;
var d1 = true;
if (trigger.player.hasSkill("jueqing") || trigger.player.hasSkill("gangzhi")) d1 = false;
for (var target of trigger.targets) {
if (
!target.mayHaveShan(
@ -13737,18 +13730,19 @@ const skills = {
true
)
) {
if (!target.hasSkill("gangzhi")) d1 = false;
if (
get.attitude(player, target) < 0 &&
!trigger.player.hasSkillTag("jueqing", false, target) &&
!target.hasSkillTag("filterDamage", null, {
player: trigger.player,
card: trigger.card,
}) &&
get.attitude(player, target) < 0
})
)
return true;
}
}
return d1;
return false;
})()
);
if (!event.target.isUnderControl(true) && !event.target.isOnline()) game.delayx();
@ -16108,9 +16102,8 @@ const skills = {
return event.card.name == "sha" && (event.player == player || player.inRange(event.player)) && player.countCards("he") > 0;
},
checkx(event, player) {
let d1 = true,
let d1 = false,
e = false;
if (event.player.hasSkill("jueqing") || event.player.hasSkill("gangzhi")) d1 = false;
for (let tar of event.targets) {
if (event.card.name == "sha") {
if (
@ -16131,13 +16124,14 @@ const skills = {
true
)
) {
if (!tar.hasSkill("gangzhi")) d1 = false;
if (
!event.player.hasSkillTag("jueqing", false, tar) &&
!tar.hasSkillTag("filterDamage", null, {
player: event.player,
card: event.card,
})
) {
d1 = true;
let att = get.attitude(_status.event.player, tar);
if (att > 0) return false;
if (att < 0) e = true;

View File

@ -3703,7 +3703,7 @@ const skills = {
ai: {
effect: {
target: function (card, player, target) {
if (target.countCards("h") > target.getHp() || player.hasSkillTag("jueqing")) return;
if (target.countCards("h") > target.getHp() || player.hasSkillTag("jueqing", false, target)) return;
if (player._dcxiongmu_temp) return;
if (_status.event.getParent("useCard", true) || _status.event.getParent("_wuxie", true)) return;
if (get.tag(card, "damage")) {
@ -12997,7 +12997,7 @@ const skills = {
threaten: 0.9,
effect: {
target: function (card, player, target) {
if (player.hasSkillTag("jueqing")) return;
if (player.hasSkillTag("jueqing", false, target)) return;
//if(target.hujia) return;
if (player._jinjian_tmp) return;
if (_status.event.getParent("useCard", true) || _status.event.getParent("_wuxie", true)) return;

View File

@ -14383,7 +14383,7 @@ const skills = {
threaten: 0.9,
effect: {
target: function (card, player, target) {
if (player.hasSkillTag("jueqing")) return;
if (player.hasSkillTag("jueqing", false, target)) return;
if (target.hujia) return;
if (player._shibei_tmp) return;
if (target.hasSkill("shibei_ai")) return;

View File

@ -2313,6 +2313,9 @@ const skills = {
if (player.getEquips(5).length) return distance - 1;
},
},
ai: {
combo: "chexuan"
},
},
cheliji_sichengliangyu: {
trigger: { global: "phaseJieshuBegin" },

View File

@ -9028,9 +9028,7 @@ export class Player extends HTMLDivElement {
*/
hasSkillTag(tag, hidden, arg, globalskill) {
var skills = this.getSkills(hidden);
if (globalskill) {
skills.addArray(lib.skill.global);
}
if (globalskill !== false) skills.addArray(lib.skill.global);
game.expandSkills(skills);
for (var i = 0; i < skills.length; i++) {
var info = lib.skill[skills[i]];