示例#1
0
文件: Being.cs 项目: ActionAlgot/srpg
 public void AddToBattle(Battle battle, int x, int y)
 {
     if (Battle != null)
     {
         throw new ArgumentException("I don't know what the f**k I'm doing");
     }
     Battle          = battle;
     OverTimeApplier = new OverTimeApplier(Battle, this);
     Place           = Battle.TileSet[x, y];
     Battle.Add(this);
 }
示例#2
0
        public ChannelingInstance(Battle battle, IEnumerable <Mod> mods, Skill skill, Tile place, Func <Tile> targetSelector)
        {
            Stats           = new StatSet();
            SkillUsageStats = new Dictionary <object, StatSet>();
            Battle          = battle;
            Battle.Add(this);

            Skill          = skill;
            Place          = place;
            TargetSelector = targetSelector;

            foreach (var m in mods)
            {
                m.Affect(Stats);
            }

            TurnFinished += (s, e) => Battle.Remove(this);
            TurnStarted  += OnTurnStarted;
        }
示例#3
0
 public OverTimeApplier(Battle battle, Being target)
 {
     Target = target;
     battle.Add(this);
 }
示例#4
0
 public override void Affect()
 {
     base.Affect();
     TurnStarted += (s, e) => UnAffect();
     _Battle.Add(this);
 }