예제 #1
0
 public SpellSource(SpellKind kind)
 {
     Symbol         = '?';
     Price          = 20;
     Kind           = kind;
     PositionInPage = -1;
 }
예제 #2
0
        public static EntityStatKind EntityStatKindFromSpellKind(SpellKind spellKind)
        {
            EntityStatKind esk = EntityStatKind.Unset;

            switch (spellKind)
            {
            case SpellKind.FireBall:
            case SpellKind.NESWFireBall:
                esk = EntityStatKind.FireAttack;
                break;

            case SpellKind.IceBall:
                esk = EntityStatKind.ColdAttack;
                break;

            case SpellKind.PoisonBall:
                esk = EntityStatKind.PoisonAttack;
                break;

            case SpellKind.LightingBall:
                esk = EntityStatKind.LightingAttack;
                break;

            default:
                break;
            }

            return(esk);
        }
예제 #3
0
        private Scroll PrepareScroll(Hero hero, SpellKind spellKind, Enemy enemy = null)
        {
            var emp = game.GameManager.CurrentNode.GetClosestEmpty(hero);

            if (enemy != null)
            {
                Assert.True(game.GameManager.CurrentNode.SetTile(enemy, emp.point));
            }
            var scroll = new Scroll(spellKind);

            hero.Inventory.Add(scroll);

            return(scroll);
        }
예제 #4
0
 public SpellInfo(TimeSpan cooldown, TimeSpan cast, int projectiles, float range,
                  float speed, float width, bool solid, SpellKind kind, float value,
                  int spellNumber, Action <WorldInfoForSpell> onActivation)
 {
     Cooldown     = cooldown;
     CastingTime  = cast;
     Projectiles  = projectiles;
     Range        = range;
     Speed        = speed;
     Width        = width;
     Kind         = kind;
     Value        = value;
     SpellNumber  = spellNumber;
     Solid        = solid;
     OnActivation = onActivation;
 }
예제 #5
0
		public SpellInfo(TimeSpan cooldown, TimeSpan cast, int projectiles, float range, 
		                 float speed, float width, bool solid, SpellKind kind, float value,
		                 int spellNumber, Action<WorldInfoForSpell> onActivation)
		{
			Cooldown = cooldown;
			CastingTime = cast;
			Projectiles = projectiles;
			Range = range;
			Speed = speed;
			Width = width;
			Kind = kind;
			Value = value;
			SpellNumber = spellNumber;
			Solid = solid;
			OnActivation = onActivation;
		}
예제 #6
0
파일: Book.cs 프로젝트: tomaszkot/Roguelike
 public Book(SpellKind kind = SpellKind.Unset) : base(kind)
 {
     LootKind = LootKind.Book;
     Price   *= 5;
 }
예제 #7
0
 public Scroll(SpellKind kind = SpellKind.Unset) : base(kind)
 {
     LootKind = LootKind.Scroll;
     Price    = 5;
 }
예제 #8
0
 /// <summary>
 /// Constructor to initialize the spell's name and spell type/kind
 /// </summary>
 /// <param name="txt">Text.</param>
 /// <param name="Skind">Skind.</param>
 public Spell(string txt, SpellKind Skind)
 {
     name = txt;
     kind = Skind;
 }
예제 #9
0
 public virtual float GetExtraDamage(SpellKind kind, float damage)
 {
     return(0);
 }
예제 #10
0
 public static EntityStatKind ToEntityStatKind(this SpellKind spellKind)
 {
     return(EntityStatKindFromSpellKind(spellKind));
 }
예제 #11
0
        public static EffectType EffectTypeFromSpellKind(SpellKind sk)
        {
            switch (sk)
            {
            case SpellKind.Unset:
                break;

            case SpellKind.FireBall:
                return(EffectType.Firing);

            case SpellKind.CrackedStone:
                break;

            case SpellKind.Skeleton:
                break;

            case SpellKind.Trap:
                break;

            case SpellKind.IceBall:
                return(EffectType.Frozen);

            case SpellKind.PoisonBall:
                return(EffectType.Poisoned);

            case SpellKind.Transform:
                return(EffectType.Transform);

            case SpellKind.Frighten:
                break;

            case SpellKind.Healing:
                break;

            case SpellKind.ManaShield:
                return(EffectType.ManaShield);

            case SpellKind.Telekinesis:
                break;

            case SpellKind.StonedBall:
                break;

            case SpellKind.LightingBall:
                break;

            case SpellKind.Mana:
                break;

            case SpellKind.BushTrap:
                break;

            case SpellKind.Weaken:
                break;

            case SpellKind.NESWFireBall:
                break;

            case SpellKind.Teleport:
                break;

            case SpellKind.IronSkin:
                break;

            case SpellKind.ResistAll:
                break;

            case SpellKind.Inaccuracy:
                break;

            case SpellKind.Identify:
                break;

            case SpellKind.Portal:
                break;

            default:
                break;
            }

            return(EffectType.Unset);
        }
예제 #12
0
        public static SpellKind SpellKindFromEffectType(EffectType et)
        {
            SpellKind spellKind = SpellKind.Unset;

            switch (et)
            {
            case EffectType.Bleeding:
                break;

            case EffectType.Poisoned:
                break;

            case EffectType.Frozen:
                break;

            case EffectType.Firing:
                break;

            case EffectType.Transform:
                break;

            case EffectType.TornApart:
                break;

            case EffectType.Frighten:
                break;

            case EffectType.Stunned:
                break;

            case EffectType.ManaShield:
                break;

            case EffectType.BushTrap:
                break;

            case EffectType.Weaken:
                spellKind = SpellKind.Weaken;
                break;

            case EffectType.IronSkin:
                spellKind = SpellKind.IronSkin;
                break;

            case EffectType.ResistAll:
                spellKind = SpellKind.ResistAll;
                break;

            case EffectType.Inaccuracy:
                spellKind = SpellKind.Inaccuracy;
                break;

            case EffectType.Hooch:
                break;

            case EffectType.ConsumedRawFood:
                break;

            case EffectType.ConsumedRoastedFood:
                break;

            default:
                break;
            }

            return(spellKind);
        }
예제 #13
0
 public WeaponSpellSource(Weapon weapon, SpellKind kind, int chargesCount = 15) : base(kind)
 {
     this.Weapon      = weapon;
     InitChargesCount = chargesCount;
 }
예제 #14
0
 public Spell()
 {
     name   = "Default";
     kind   = SpellKind.Heal;
     result = "and... nothing happened";
 }
예제 #15
0
 public Spell()
 {
     name = "Default";
     kind = SpellKind.Heal;
 }
예제 #16
0
 public IProjectile CreateProjectile(Vector2D pos, SpellKind sk)
 {
     return(null);
 }