public override IEnumerator ApplyEffect( CardEffectState cardEffectState, CardEffectParams cardEffectParams) { int damageAmount = this.GetDamageAmount(cardEffectState); if (cardEffectState.GetTargetMode() == TargetMode.Room) { cardEffectParams.combatManager.IgnoreDuplicateSounds(true); } for (int i = 0; i < cardEffectParams.targets.Count; ++i) { CharacterState target = cardEffectParams.targets[i]; yield return((object)cardEffectParams.combatManager.ApplyDamageToTarget(damageAmount, target, new CombatManager.ApplyDamageToTargetParameters() { playedCard = cardEffectParams.playedCard, finalEffectInSequence = cardEffectParams.finalEffectInSequence, relicState = cardEffectParams.sourceRelic, selfTarget = cardEffectParams.selfTarget, vfxAtLoc = cardEffectState.GetAppliedVFX(), showDamageVfx = cardEffectParams.allowPlayingDamageVfx })); } cardEffectParams.combatManager.IgnoreDuplicateSounds(false); }
public override bool TestEffect(CardEffectState cardEffectState, CardEffectParams cardEffectParams) { StatusEffectStackData statusEffectStack = GetStatusEffectStack(cardEffectState); if (statusEffectStack == null) { return(false); } if (cardEffectState.GetTargetMode() != TargetMode.DropTargetCharacter) { return(true); } if (cardEffectParams.targets.Count <= 0) { return(false); } if (cardEffectParams.statusEffectManager.GetStatusEffectDataById(statusEffectStack.statusId).IsStackable()) { return(true); } ProviderManager.TryGetProvider <RoomManager>(out RoomManager roomManager); CharacterState target = roomManager.GetPyreRoom().GetPyreHeart(); if (!target.HasStatusEffect(statusEffectStack.statusId)) { return(true); } return(false); }
public override bool TestEffect(CardEffectState cardEffectState, CardEffectParams cardEffectParams) { if (cardEffectState.GetTargetMode() != TargetMode.DropTargetCharacter) { return(true); } if (cardEffectParams.targets.Count <= 0) { return(false); } return(false); }
static void Postfix(CardEffectState effectState, List <CharacterState> targets, SpawnPoint dropLocation, SubtypeData targetSubtype) { if (BossTargetIgnoreFix.targetIgnoreBosses && effectState.GetTargetMode() == TargetMode.DropTargetCharacter && dropLocation != null) { CharacterState characterState = dropLocation.GetCharacterState(); if (characterState.IsMiniboss() || characterState.IsOuterTrainBoss()) { targets.Clear(); // lastTargetedCharacters.Clear(); } } }
public override bool TestEffect( CardEffectState cardEffectState, CardEffectParams cardEffectParams) { int intInRange = GetDamageAmount(cardEffectState); bool flag2 = true; if (cardEffectState.GetTargetMode() == TargetMode.DropTargetCharacter) { flag2 = cardEffectParams.targets.Count > 0; } return(intInRange >= 0 && flag2); }
public override bool TestEffect(CardEffectState cardEffectState, CardEffectParams cardEffectParams) { StatusEffectStackData statusEffectStack = GetStatusEffectStack(cardEffectState); if (cardEffectParams.targets.Count <= 0) { return(false); } if (statusEffectStack.statusId == Burnout) { if (cardEffectParams.targets[0].IsMiniboss() || cardEffectParams.targets[0].IsOuterTrainBoss()) { return(false); } } if (statusEffectStack == null) { return(false); } if (cardEffectState.GetTargetMode() != TargetMode.DropTargetCharacter) { return(true); } if (cardEffectParams.statusEffectManager.GetStatusEffectDataById(statusEffectStack.statusId).IsStackable()) { return(true); } foreach (CharacterState target in cardEffectParams.targets) { if (!target.HasStatusEffect(statusEffectStack.statusId)) { return(true); } } return(false); }
private IEnumerator HandleChooseCard( CardEffectState cardEffectState, CardEffectParams cardEffectParams) { cardEffectParams.screenManager.SetScreenActive(ScreenName.Deck, true, (ScreenManager.ScreenActiveCallback)(screen => { DeckScreen deckScreen = screen as DeckScreen; deckScreen.Setup(new DeckScreen.Params() { mode = DeckScreen.Mode.CardSelection, targetMode = cardEffectState.GetTargetMode(), showCancel = false, titleKey = cardEffectState.GetParentCardState().GetTitleKey(), instructionsKey = "SeekCopyInstructions", numCardsSelectable = cardEffectState.GetParamInt(), }); deckScreen.AddDeckScreenCardStateChosenDelegate((DeckScreen.CardStateChosenDelegate)(chosenCardState => { cardEffectParams.cardManager.DrawSpecificCard(chosenCardState, 0.0f, this.GetDrawSource(cardEffectState.GetTargetMode()), cardEffectParams.playedCard, 1, 1); cardEffectParams.screenManager.SetScreenActive(ScreenName.Deck, false, (ScreenManager.ScreenActiveCallback)null); })); })); yield break; }
public virtual void AddDelegate(CardEffectState cardEffectState, CardEffectParams cardEffectParams, DeckScreen deckScreen) { deckScreen.AddDeckScreenCardStateChosenDelegate((DeckScreen.CardStateChosenDelegate)(chosenCardState => { cardEffectParams.cardManager.DrawSpecificCard(chosenCardState, 0.0f, this.GetDrawSource(cardEffectState.GetTargetMode()), cardEffectParams.playedCard, 1, 1); chosenCardState.AddTemporaryTrait(new CardTraitDataBuilder { TraitStateName = "CardTraitExhaustState" }.Build(), cardEffectParams.cardManager); cardEffectParams.screenManager.SetScreenActive(ScreenName.Deck, false, (ScreenManager.ScreenActiveCallback)null); })); }