package cfvbaibai.cardfantasy.test;

import org.junit.After;
import org.junit.Assert;
import org.junit.Test;

import cfvbaibai.cardfantasy.StaticRandomizer;
import cfvbaibai.cardfantasy.engine.RuneInfo;

public class SummonSkillTest {
    private static StaticRandomizer random = FeatureValidationTests.getRandom();

    @After
    public void afterTest() {
        random.reset();
    }

    /**
     * 降临技能在符文发动和结算之前发动
     */
    @Test
    public void test降临摧毁_焚天() {
        FeatureTestContext context = FeatureValidationTests.prepare(50, 50, "独眼巨人", "焚天", "凤凰-5*2");
        context.addToHand(0, 0).setSummonDelay(0);
        RuneInfo r焚天 = context.addToRune(0, 0);
        context.addToField(1, 1);
        context.addToField(2, 1);
        context.startGame();

        random.addNextPicks(0); // 独眼巨人摧毁
        context.proceedOneRound();

        // 降临技能先结算，杀死一只凤凰，对方场上只剩一张森林卡，无法激活焚天
        Assert.assertFalse("焚天应该未激活", r焚天.isActivated());
        Assert.assertEquals(1, context.getPlayer(1).getField().size());
    }
}

@@ -146,24 +146,70 @@
 Randomizer;%0A
+import cfvbaibai.cardfantasy.engine.CardInfo;%0A
 import cfvba
@@ -1067,10 +1067,586 @@
 ;%0A    %7D%0A
+    %0A    /**%0A     * %E6%9C%89%E5%A4%9A%E5%BC%A0%E5%8D%A1%E7%89%8C%E7%AD%89%E5%BE%85%E6%97%B6%E9%97%B4%E7%9B%B8%E5%90%8C%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%EF%BC%8C%E9%99%8D%E4%B8%B4%E4%BC%A0%E9%80%81%E4%BC%9A%E6%9D%80%E6%AD%BB%E5%85%B6%E4%B8%AD%E6%9C%80%E9%9D%A0%E5%89%8D%E7%9A%84%E9%82%A3%E5%BC%A0%0A     */%0A    @Test%0A    public void test%E9%99%8D%E4%B8%B4%E4%BC%A0%E9%80%81_%E7%9B%B8%E5%90%8C%E7%AD%89%E5%BE%85%E6%97%B6%E9%97%B4() %7B%0A        FeatureTestContext context = FeatureValidationTests.prepare(50, 50, %22%E9%9A%90%E4%B8%96%E5%85%88%E7%9F%A5%22, %22%E9%87%91%E5%B1%9E%E5%B7%A8%E9%BE%99-5%22, %22%E5%87%A4%E5%87%B0-5%22);%0A        context.addToHand(0, 0).setSummonDelay(0);%0A        CardInfo c%E9%87%91%E5%B1%9E%E5%B7%A8%E9%BE%99 = context.addToField(1, 1).setSummonDelay(3);%0A        CardInfo c%E5%87%A4%E5%87%B0 = context.addToField(2, 1).setSummonDelay(3);%0A        context.startGame();%0A%0A        context.proceedOneRound();%0A%0A        Assert.assertFalse(%22%E5%87%A4%E5%87%B0%E5%BA%94%E8%AF%A5%E8%BF%98%E6%B4%BB%E7%9D%80%22, c%E5%87%A4%E5%87%B0.isDead());%0A        Assert.assertTrue(%22%E9%87%91%E5%B1%9E%E5%B7%A8%E9%BE%99%E5%BA%94%E8%AF%A5%E6%AD%BB%E4%BA%86%22, c%E9%87%91%E5%B1%9E%E5%B7%A8%E9%BE%99.isDead());%0A    %7D%0A
 %7D%0A

Add test降临传送_相同等待时间