mob CreateMob(Emobtype t, int tentx, int tenty)
    {
        mob m = new mob(t);

        m.posx = tentx; m.posy = tenty;
        map.itemgrid[tentx, tenty] = new item_instance(m.tile, true, m);
        map.passable[tentx, tenty] = false;
        map.newmoblist.Add(m);
        return(m);
    }
Example #2
0
    void CreateMob(Emobtype t, int tentx, int tenty)
    {//copied from Game.CreateMob
        mob m = new mob(t);

        m.attackbonus              = attackbonus;
        m.defencebonus             = defencebonus;
        m.posx                     = tentx; m.posy = tenty;
        map.itemgrid[tentx, tenty] = new item_instance(m.tile, true, m);
        map.passable[tentx, tenty] = false;
        map.newmoblist.Add(m);
        unitlist.Add(m);
        armycostperturn_food += m.archetype.upkeepfood;
        armycostperturn_gold += m.archetype.upkeepgold;
        m.citythatownsit      = this;
        // return m;
    }
Example #3
0
    public mob(Emobtype typ)
    {
        AIformob = new AI();
        mobarchetype at = archetypes[(int)typ];

        archetype = at;
        hp        = at.hp;
        tile      = at.tile;
        hostile_toenemies_currently = at.hostile_toenemies;
        hostile_toplayer_currently  = at.hostile_toplayer;
        //undead_currently = at.undead;
        flies_currently  = at.flies;
        skates_currently = at.skates;

        facing = 0;
        speed  = 0;
    }
Example #4
0
    public mobarchetype(Emobtype _type, string _name, string _wep, int _hp, bool _hostileplayer, bool _hostileenemy, Etilesprite _tile,
                        int _upkeepgold, int _upkeepfood, int _buildprod, int _buildhorse, int _buildiron,
                        int _al, int _ah, int _def, int _sr, bool _tank, bool _parry, int _moves, int _attacks)
    {
        type                = _type;
        name                = _name; weaponname = _wep; hp = _hp; tile = _tile; hostile_toplayer = _hostileplayer; hostile_toenemies = _hostileenemy;
        upkeepgold          = _upkeepgold;
        upkeepfood          = _upkeepfood;
        buildcostproduction = _buildprod;
        buildcostiron       = _buildiron;
        buildcosthorses     = _buildhorse;

        attacklow   = _al;
        attackhigh  = _ah;
        defence     = _def;
        sightradius = _sr;
        tank        = _tank;
        parry       = _parry;
        moves       = _moves;
        attacks     = _attacks;
    }