56 lines
1.5 KiB
C#
56 lines
1.5 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public enum CardId {
|
|
CrashingPunch,
|
|
Cover,
|
|
LightningStrike,
|
|
Scarring,
|
|
Thunderstorm,
|
|
BlindFury,
|
|
Crush,
|
|
Meditate,
|
|
Earthquake,
|
|
LightningHatchet,
|
|
InnerStrength,
|
|
Fireworks,
|
|
MolotovCocktail,
|
|
Fracking,
|
|
CanisterBomb,
|
|
IronskinDraught,
|
|
}
|
|
|
|
public class HeroCardDatabase : CardDatabase<HeroCard>
|
|
{
|
|
private static Dictionary<CardId, HeroId> CARD_TO_HERO = new Dictionary<CardId, HeroId>() {
|
|
{CardId.CrashingPunch, HeroId.Brute},
|
|
{CardId.Cover, HeroId.Brute},
|
|
{CardId.LightningStrike, HeroId.Shaman},
|
|
{CardId.Scarring, HeroId.Brute},
|
|
{CardId.Thunderstorm, HeroId.Shaman},
|
|
};
|
|
|
|
public override HeroCard CreateCard(int id, BattleParticipant owner) {
|
|
CardId heroCardId = (CardId) id;
|
|
switch (heroCardId)
|
|
{
|
|
case CardId.CrashingPunch:
|
|
return new CardCrashingPunch(owner);
|
|
case CardId.Cover:
|
|
return new CardCover(owner);
|
|
case CardId.LightningStrike:
|
|
return new CardLightningStrike(owner);
|
|
case CardId.Scarring:
|
|
return new CardScarring(owner);
|
|
case CardId.Thunderstorm:
|
|
return new CardThunderstorm(owner);
|
|
default:
|
|
throw new System.ArgumentException("CardId unknown", "id");
|
|
}
|
|
}
|
|
|
|
public static HeroId GetHeroIdOfCard(CardId id) {
|
|
return CARD_TO_HERO[id];
|
|
}
|
|
}
|