com.megacrit.cardcrawl.actions.GameActionManager Java Examples
The following examples show how to use
com.megacrit.cardcrawl.actions.GameActionManager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MonsterLastDamagedOnTurnPatch.java From jorbs-spire-mod with MIT License | 5 votes |
@SpirePostfixPatch public static void patch(AbstractMonster __instance) { if (__instance.lastDamageTaken > 0) { MonsterLastDamagedOnTurnField.lastDamagedOnTurn.set(__instance, GameActionManager.turn); } }
Example #2
Source File: TollTheDead.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void use(AbstractPlayer p, AbstractMonster m) { addToBot(new DamageAction(m, new DamageInfo(p, damage), AttackEffect.SMASH)); final boolean monsterWasDamagedThisTurn = MonsterLastDamagedOnTurnField.lastDamagedOnTurn.get(m) == GameActionManager.turn; if (monsterWasDamagedThisTurn) { addToBot(new DamageAction(m, new DamageInfo(p, damage), AttackEffect.SMASH)); } }
Example #3
Source File: EntombedGrimoirePower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void atStartOfTurn() { // Note, the turn counter appears off by one because it isn't incremented til after start-of-turn powers are applied. // However, on the first turn, turn is set to 1. amount = turnToExhume - GameActionManager.turn - (isFirstTurn ? 0 : 1); updateDescription(); isFirstTurn = false; if (amount <= 0) { flash(); addToBot(new ExhumeCardsAction(cardToExhume)); } }
Example #4
Source File: EntombedGrimDirgePower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void atStartOfTurn() { // Note, the turn counter appears off by one because it isn't incremented til after start-of-turn powers are applied. // However, on the first turn, turn is set to 1. amount = turnToExhume - GameActionManager.turn - (isFirstTurn ? 0 : 1); updateDescription(); isFirstTurn = false; if (amount <= 0) { flash(); addToBot(new ExhumeCardsAction(cardToExhume)); addToBot(new RemoveSpecificPowerAction(AbstractDungeon.player, AbstractDungeon.player, this)); } }
Example #5
Source File: OnAfterPlayerHpLossSubscriberPatch.java From jorbs-spire-mod with MIT License | 4 votes |
@Override public int[] Locate(CtBehavior ctMethodToPatch) throws Exception { Matcher finalMatcher = new Matcher.FieldAccessMatcher(GameActionManager.class, "damageReceivedThisTurn"); return LineFinder.findInOrder(ctMethodToPatch, finalMatcher); }
Example #6
Source File: MemoryHooksPatch.java From jorbs-spire-mod with MIT License | 4 votes |
@SpireInsertPatch(locator = Locator.class) public static void patch(GameActionManager __this) { forEachMemory(AbstractDungeon.player, m -> m.onPlayCard(__this.cardQueue.get(0).card, __this.cardQueue.get(0).monster)); }
Example #7
Source File: MemoryHooksPatch.java From jorbs-spire-mod with MIT License | 4 votes |
@SpirePrefixPatch public static void patch(GameActionManager __this) { forEachMemory(AbstractDungeon.player, m -> m.atEndOfTurnPreEndTurnCards()); }
Example #8
Source File: TollTheDead.java From jorbs-spire-mod with MIT License | 4 votes |
@Override public boolean shouldGlowGold() { return AbstractDungeon.getCurrRoom().monsters.monsters.stream().anyMatch(m -> !m.isDeadOrEscaped() && MonsterLastDamagedOnTurnField.lastDamagedOnTurn.get(m) == GameActionManager.turn); }
Example #9
Source File: RelicOnChannelPatch.java From StSLib with MIT License | 4 votes |
@Override public int[] Locate(CtBehavior ctMethodToPatch) throws Exception { Matcher finalMatcher = new Matcher.FieldAccessMatcher(GameActionManager.class, "orbsChanneledThisCombat"); return LineFinder.findInOrder(ctMethodToPatch, finalMatcher); }