Implement statuses, GolemCharge, GolemBerserk, stun

This commit is contained in:
henriquenakashima 2020-09-20 22:02:34 -04:00
parent caf782c884
commit ef9ec43c8a
16 changed files with 260 additions and 38 deletions

View file

@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GolemBerserkMCard : MonsterCard
{
public GolemBerserkMCard(BattleParticipant owner)
: base(owner, MCardId.GolemBerserk, "Golem Berserk", 7, CardType.Attack,
"Deals 8 damage to target and 4 damage to other enemies."
+ "Target: nearest hero.") {
}
public override IEnumerator Use(IBattleEffectApplier effectApplier, MonsterViewpoint monsterViewpoint) {
BattleParticipant target = AIUtils.GetNearestHero(monsterViewpoint, this.owner);
effectApplier.Apply(new DealDamageEffect(target, 8));
yield return new WaitForSeconds(1f);
foreach (BattleHero hero in monsterViewpoint.Heroes) {
if (hero != target) {
effectApplier.Apply(new DealDamageEffect(hero, 4));
}
}
yield return new WaitForSeconds(1f);
yield break;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8989d6bcb159b934f903860d3bc33c31
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,24 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GolemChargeMCard : MonsterCard
{
public GolemChargeMCard(BattleParticipant owner)
: base(owner, MCardId.GolemCharge, "Golem Charge", 5, CardType.Attack,
"Deals 4 damage to target and stuns it. Acquire a Golem Berserk. "
+ "Target: farthest hero.") {
}
public override IEnumerator Use(IBattleEffectApplier effectApplier, MonsterViewpoint monsterViewpoint) {
BattleParticipant target = AIUtils.GetFarthestHero(monsterViewpoint, this.owner);
DealDamageEffect damageEffect = new DealDamageEffect(target, 4);
effectApplier.Apply(damageEffect);
StatusEffect statusEffect = new StatusEffect(target, BattleStatus.Stun);
effectApplier.Apply(statusEffect);
AcquireCardsEffect acquireEffect = new AcquireCardsEffect(
MCardId.GolemBerserk, BattleZone.DiscardPile, this.owner);
effectApplier.Apply(acquireEffect);
yield break;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 227631868e2bca746a7fa186c249248c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: