Skip to content

Commit

Permalink
Tag the basegame basic cards with BASIC_STRIKE, BASIC_DEFEND, and FORM
Browse files Browse the repository at this point in the history
  • Loading branch information
kiooeht committed Dec 14, 2018
1 parent 26709a3 commit 673d6e0
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,3 +499,4 @@ This is a fast forward to v1.6.3 of daviscook477's fork with a few additional ch
#### dev ####
* Fix unlock crash on victory with custom characters (kiooeht)
* Fix PostDeath hook not triggering on killing Heart (kiooeht)
* Tag the basegame basic cards with BASIC_STRIKE, BASIC_DEFEND, and FORM (kiooeht)
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package basemod.patches.com.megacrit.cardcrawl.cards;

import basemod.helpers.BaseModCardTags;
import com.evacipated.cardcrawl.modthespire.lib.SpirePatch;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.cards.blue.Defend_Blue;
import com.megacrit.cardcrawl.cards.blue.EchoForm;
import com.megacrit.cardcrawl.cards.blue.Strike_Blue;
import com.megacrit.cardcrawl.cards.green.Defend_Green;
import com.megacrit.cardcrawl.cards.green.Strike_Green;
import com.megacrit.cardcrawl.cards.green.WraithForm;
import com.megacrit.cardcrawl.cards.red.Defend_Red;
import com.megacrit.cardcrawl.cards.red.DemonForm;
import com.megacrit.cardcrawl.cards.red.Strike_Red;

public class TagBasicCards
{
@SpirePatch(
clz=Strike_Red.class,
method=SpirePatch.CONSTRUCTOR
)
@SpirePatch(
clz=Strike_Green.class,
method=SpirePatch.CONSTRUCTOR
)
@SpirePatch(
clz=Strike_Blue.class,
method=SpirePatch.CONSTRUCTOR
)
public static class Strikes
{
public static void Postfix(AbstractCard __instance)
{
__instance.tags.add(BaseModCardTags.BASIC_STRIKE);
}
}

@SpirePatch(
clz=Defend_Red.class,
method=SpirePatch.CONSTRUCTOR
)
@SpirePatch(
clz=Defend_Green.class,
method=SpirePatch.CONSTRUCTOR
)
@SpirePatch(
clz=Defend_Blue.class,
method=SpirePatch.CONSTRUCTOR
)
public static class Defends
{
public static void Postfix(AbstractCard __instance)
{
__instance.tags.add(BaseModCardTags.BASIC_DEFEND);
}
}

@SpirePatch(
clz=DemonForm.class,
method=SpirePatch.CONSTRUCTOR
)
@SpirePatch(
clz=WraithForm.class,
method=SpirePatch.CONSTRUCTOR
)
@SpirePatch(
clz=EchoForm.class,
method=SpirePatch.CONSTRUCTOR
)
public static class Forms
{
public static void Postfix(AbstractCard __instance)
{
__instance.tags.add(BaseModCardTags.FORM);
}
}
}

0 comments on commit 673d6e0

Please sign in to comment.