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