public ActionMove(Unit actor, List <Direction> route, UInt16 APCost, DrawerBattle drawer)
     : base(actor)
 {
     _APCost = APCost;
     _route  = route;
     _drawer = drawer;
 }
Beispiel #2
0
 public Spell(Spells type, Creature agent, DrawerBattle drawer, InterfaceBattle myInterface,
              SpellTarget targetType, UInt16 range, UInt16 magnitude, UInt16 executionTime)
 {
     _type       = type;
     _agent      = agent;
     _map        = _agent.MapBattlemap;
     _drawer     = drawer;
     _interface  = myInterface;
     _targetType = targetType;
     //_spellEffects = spellEffects;
     _range         = range;
     _magnitude     = magnitude;
     _executionTime = executionTime;
 }
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            this.IsMouseVisible = true;

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            _myInterfaceMenu   = new InterfaceStartMenu(this);
            _myDrawerStartMenu = new DrawerStartMenu(this, Content, _myInterfaceMenu);

            _randomator = new RandomStuff(907);

            _myInterface = new InterfaceBattle(this);
            _myDrawer    = new DrawerBattle(this, Content, _myInterface);

            base.Initialize();
        }
Beispiel #4
0
        private void CreateSpellForCreature(Creature agent, Spells type, DrawerBattle myDrawer, InterfaceBattle myInterface)
        {
            Spell newSpell = null;

            switch (type)
            {
            case Spells.SkillMelee:
                newSpell = new SkillBasicAttackMelee(agent, myDrawer, myInterface, SpellTarget.Hex, 1,
                                                     Constants.APActionCostsStandard[(sbyte)APCostTypes.AttackMelee]);
                break;

            case Spells.SkillRanged:     // FIX RANGE
                newSpell = new SKillBasicAttackRanged(agent, myDrawer, myInterface, SpellTarget.Hex, 1,
                                                      Constants.APActionCostsStandard[(sbyte)APCostTypes.AttackMelee]);
                break;
            }

            agent.SpellAdd(newSpell);
        }
 public MapGenerator(RandomStuff randomator, InterfaceBattle gameInterface, DrawerBattle drawer)
 {
     _randomator = randomator;
     _interface  = gameInterface;
     _drawer     = drawer;
 }
Beispiel #6
0
 public BrainBasicAI(DrawerBattle drawer)
     : base()
 {
     _drawer = drawer;
 }
Beispiel #7
0
 public BrainBasicAI(Creature owner, DrawerBattle drawer)
     : base(owner)
 {
     _drawer = drawer;
 }
Beispiel #8
0
 public SKillBasicAttackRanged(Creature agent, DrawerBattle drawer, InterfaceBattle myInterface,
                               SpellTarget targetType, UInt16 magnitude, UInt16 executionTime)
     : base(Spells.SkillRanged, agent, drawer, myInterface, targetType, agent.GetAttackRange(), magnitude, executionTime)
 {
 }
Beispiel #9
0
 public SkillBasicAttackMelee(Creature agent, DrawerBattle drawer, InterfaceBattle myInterface,
                              SpellTarget targetType, UInt16 magnitude, UInt16 executionTime)
     : base(Spells.SkillMelee, agent, drawer, myInterface, targetType, 1, magnitude, executionTime)
 {
 }
Beispiel #10
0
        /// <summary>
        /// Spawns the player on the 'ground' at 'startPoint'
        /// returns a reference to the Player so one can more easily take care of references.
        /// </summary>

        /*
         * public Creature SpawnPlayer(Coords startPoint)
         * {
         *  //Player player = new Player(this, startPoint, this.IssueCreatureID());
         *  //this.PlayerReference = player;
         *  return null;
         * }
         */
        public Creature CreateCreature(Coords startPoint, Team team, CreatureGenerator generator, Brain creatureBrain, DrawerBattle myDrawer, InterfaceBattle myInterface)
        {
            Creature newguy = new Creature(this, startPoint, (UInt16)this.IssueCreatureID(), team, generator, creatureBrain);

            team.MemberRegister(newguy);
            for (int i = 0; i < generator.SpellEndowment.Length; ++i)
            {
                CreateSpellForCreature(newguy, generator.SpellEndowment[i], myDrawer, myInterface);
            }
            return(newguy);
        }