/** 燕返不会触发逃跑 */ @Test public void test逃跑_燕返() { SkillTestContext context = prepare(50, 50, "秘银巨石像+逃跑", "秘银巨石像+燕返"); CardInfo c秘银巨石像1 = context.addToField(0, 0).setBasicHP(2); CardInfo c秘银巨石像2 = context.addToField(1, 1).setBasicHP(2); context.startGame(); context.proceedOneRound(); Assert.assertEquals(0, context.getPlayer(0).getField().size()); Assert.assertEquals(0, context.getPlayer(0).getHand().size()); Assert.assertTrue(c秘银巨石像1.isDead()); Assert.assertTrue(c秘银巨石像2.isDead()); }
@Test public void test骑士守护_物理攻击_致死() { SkillTestContext context = prepare(50, 50, "秘银巨石像", "残血王国小兵+骑士守护"); context.addToField(0, 0); CardInfo c残血王国小兵 = context.addToField(1, 1).setBasicHP(10); context.startGame(); context.proceedOneRound(); Assert.assertTrue(c残血王国小兵.isDead()); // 骑士守护无法防御物理致死攻击 }
@Test public void test骑士守护_魔法攻击_杀死() { SkillTestContext context = prepare(50, 50, "占位符+血炼10", "残血王国小兵+骑士守护"); context.addToField(0, 0); CardInfo c残血王国小兵 = context.addToField(1, 1).setBasicHP(1); context.startGame(); random.addNextPicks(0); // 血炼10 context.proceedOneRound(); Assert.assertTrue(c残血王国小兵.isDead()); }
/** 骑士守护无法防御斩杀 */ @Test public void test骑士守护_斩杀() { SkillTestContext context = prepare(50, 50, "秘银巨石像+斩杀", "占位符+骑士守护"); context.addToField(0, 0); CardInfo c占位符 = context.addToField(1, 1); c占位符.setBasicHP(1000); context.startGame(); context.proceedOneRound(); Assert.assertTrue(c占位符.isDead()); }
/** 魔法伤害能杀死逃跑卡 */ @Test public void test逃跑_魔法伤害_杀死() { SkillTestContext context = prepare(50, 50, "秘银巨石像+火球1", "占位符+逃跑"); context.addToField(0, 0); CardInfo c占位符 = context.addToField(1, 1).setBasicHP(2); context.startGame(); random.addNextPicks(0).addNextNumbers(0); // 火球1 context.proceedOneRound(); Assert.assertEquals(0, context.getPlayer(1).getField().size()); Assert.assertEquals(0, context.getPlayer(1).getHand().size()); Assert.assertTrue(c占位符.isDead()); }
@Test public void test骑士守护_魔法攻击_致死() { SkillTestContext context = prepare(50, 50, "占位符+血炼10*2", "残血王国小兵+骑士守护"); context.addToField(0, 0); context.addToField(1, 0); CardInfo c残血王国小兵 = context.addToField(2, 1).setBasicHP(7); context.startGame(); random.addNextPicks(0, 0); // 血炼10 context.proceedOneRound(); Assert.assertEquals(1 /* 法术致死伤害按剩余血量一半算 */, c残血王国小兵.getHP()); Assert.assertFalse(c残血王国小兵.isDead()); }
/* * 水流护甲无法防御燕返 */ @Test public void test水流护甲_燕返() throws HeroDieSignal { SkillTestContext context = prepare(50, 50, "秘银巨石像+水流护甲1", "魔剑士+燕返"); CardInfo c秘银巨石像 = context.addToField(0, 0); CardInfo c魔剑士 = context.addToField(1, 1); c魔剑士.setBasicHP(1); context.getPlayer(1).setHP(100); context.startGame(); context.proceedOneRound(); Assert.assertTrue(c魔剑士.isDead()); Assert.assertEquals(100 /* 水流护甲面对燕返无效 */, context.getPlayer(1).getHP()); Assert.assertEquals(275 * 2, 1550 - c秘银巨石像.getHP()); }
/** 鲜血盛宴可能发动到一半被弹死,这时候剩余的对象不发动 */ @Test public void test鲜血盛宴_法力反射_多对象() { SkillTestContext context = prepare(50, 50, "占位符+鲜血盛宴1", "秘银巨石像*2", "占位符"); CardInfo c占位符1 = context.addToField(0, 0).setBasicHP(200); CardInfo c秘银巨石像1 = context.addToField(1, 1); CardInfo c秘银巨石像2 = context.addToField(2, 1); CardInfo c占位符2 = context.addToField(3, 1); context.startGame(); random.addNextPicks(0, 1, 2); context.proceedOneRound(); Assert.assertEquals(1400, c秘银巨石像1.getHP()); Assert.assertEquals(1400, c秘银巨石像2.getHP()); // 占位符1已经被第二个秘银巨石像弹死,无法继续发动鲜血盛宴到占位符2 Assert.assertEquals(5000, c占位符2.getHP()); Assert.assertEquals(0, context.getPlayer(0).getField().size()); Assert.assertTrue(c占位符1.isDead()); }