refactor: add timing to effect
This commit is contained in:
parent
e77e2d0737
commit
509e121275
|
|
@ -1,21 +1,30 @@
|
|||
id, name, description
|
||||
string, string, string
|
||||
attack, 攻击, 对对手造成伤害
|
||||
defend, 防御, 抵消下次行动前受到的伤害
|
||||
spike, 尖刺, 对攻击者造成X点伤害
|
||||
venom, 蛇毒, 弃掉超过1张蛇毒时受到6伤害
|
||||
curse, 诅咒, 受攻击时物品攻击-1,直到弃掉一张该物品的牌
|
||||
aim, 瞄准, 造成双倍伤害,受伤时失去等量瞄准
|
||||
roll, 滚动, 攻击时每消耗10点滚动造成等量伤害
|
||||
rollDamage, 滚动攻击, 消耗滚动层数造成的伤害
|
||||
vultureEye, 秃鹫之眼, 受到伤害时自动从手牌打出秃鹫的攻击
|
||||
tailSting, 尾刺, 回合结束时对玩家造成X点攻击
|
||||
energyDrain, 能量吸取, 每回合首次受伤时玩家失去1能量
|
||||
molt, 脱皮, 达到生命上限时怪物逃跑
|
||||
discard, 弃牌, 弃掉物品的牌
|
||||
storm, 风暴, 攻击时给玩家塞入1张静电
|
||||
static, 静电, 在手里时受电击伤害+1
|
||||
charge, 冲锋, 受到或造成的伤害翻倍并消耗等量冲锋
|
||||
summonMummy, 召唤木乃伊, 召唤1个木乃伊
|
||||
summonSandwormLarva, 召唤幼沙虫, 召唤1个幼沙虫
|
||||
reviveMummy, 复活木乃伊, 复活1个已死亡的木乃伊
|
||||
# instant: 不施加buff,瞬间生效
|
||||
# temporary: 施加buff,下回合开始时失效
|
||||
# lingering: 施加buff,下回合开始时失去1层
|
||||
# permanent: 施加buff
|
||||
# posture: 施加buff,每受到1点伤害移除1层
|
||||
# card: 不施加buff,对玩家时在玩家弃牌堆创建同名卡牌,对敌人无效(敌人没有牌堆)
|
||||
# cardDraw: 不施加buff,在抓牌堆洗入同名卡牌
|
||||
# cardHand:不施加buff,在玩家手牌中创建同名卡牌
|
||||
|
||||
id, name, description, timing
|
||||
string, string, string, 'instant'|'temporary'|'lingering'|'permanent'|'posture'|'card'|'cardDraw'|'cardHand'
|
||||
attack, 攻击, 对对手造成伤害, instant
|
||||
defend, 防御, 抵消下次行动前受到的伤害, posture
|
||||
spike, 尖刺, 对攻击者造成X点伤害, lingering
|
||||
venom, 蛇毒, 弃掉超过1张蛇毒时受到6伤害, lingering
|
||||
curse, 诅咒, 受攻击时物品攻击-1,直到弃掉一张该物品的牌, permanent
|
||||
aim, 瞄准, 造成双倍伤害,受伤时失去等量瞄准, lingering
|
||||
roll, 滚动, 攻击时每消耗10点滚动造成等量伤害, permanent
|
||||
rollDamage, 滚动攻击, 消耗滚动层数造成的伤害, instant
|
||||
vultureEye, 秃鹫之眼, 受到伤害时自动从手牌打出秃鹫的攻击, permanent
|
||||
tailSting, 尾刺, 回合结束时对玩家造成X点攻击, instant
|
||||
energyDrain, 能量吸取, 每回合首次受伤时玩家失去1能量, permanent
|
||||
molt, 脱皮, 达到生命上限时怪物逃跑, permanent
|
||||
discard, 弃牌, 弃掉物品的牌, instant
|
||||
storm, 风暴, 攻击时给玩家塞入1张静电, permanent
|
||||
static, 静电, 在手里时受电击伤害+1, permanent
|
||||
charge, 冲锋, 受到或造成的伤害翻倍并消耗等量冲锋, lingering
|
||||
summonMummy, 召唤木乃伊, 召唤1个木乃伊, instant
|
||||
summonSandwormLarva, 召唤幼沙虫, 召唤1个幼沙虫, instant
|
||||
reviveMummy, 复活木乃伊, 复活1个已死亡的木乃伊, instant
|
||||
|
|
|
|||
|
|
|
@ -2,6 +2,7 @@ type EffectDesertTable = readonly {
|
|||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly description: string;
|
||||
readonly timing: "instant" | "temporary" | "lingering" | "permanent" | "posture" | "card" | "cardDraw" | "cardHand";
|
||||
}[];
|
||||
|
||||
export type EffectDesert = EffectDesertTable[number];
|
||||
|
|
|
|||
|
|
@ -143,6 +143,14 @@ describe('effectDesert.csv import', () => {
|
|||
expect(effect).toHaveProperty('id');
|
||||
expect(effect).toHaveProperty('name');
|
||||
expect(effect).toHaveProperty('description');
|
||||
expect(effect).toHaveProperty('timing');
|
||||
}
|
||||
});
|
||||
|
||||
it('should have valid timing values', () => {
|
||||
const validTimings = ['instant', 'temporary', 'lingering', 'permanent', 'posture', 'card', 'cardDraw', 'cardHand'];
|
||||
for (const effect of effectDesertData) {
|
||||
expect(validTimings).toContain(effect.timing);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue