Exemple #1
0
        public void Init(String name, String charClass, int level, int levelToDisplay, PromotedStatuses promotedStatus, int hitPoints, int maxHitPoints, int attackPoints, int defensePoints, int magicPoints, int maxMagicPoints, bool mustSurvive, int movePoints, int agility, bool flying, bool alive, int numKills, int numDefeats, int experiencePoints, int minAttackRange, int maxAttackRange, bool hasSpecialAttack, Item[] items, bool[] itemEquipped, Spell[] magicSpells, Texture2D[] texture, Texture2D portrait)
        {
            _name             = name;
            _charClass        = charClass;
            _level            = level;
            _levelToDisplay   = levelToDisplay;
            _promotedStatus   = promotedStatus;
            _hitPoints        = hitPoints;
            _maxHitPoints     = maxHitPoints;
            _attackPoints     = attackPoints;
            _defensePoints    = defensePoints;
            _magicPoints      = magicPoints;
            _maxMagicPoints   = maxMagicPoints;
            _mustSurvive      = mustSurvive;
            _boss             = false;
            _movePoints       = movePoints;
            _agility          = agility;
            _flying           = flying;
            _alive            = alive;
            _visible          = true;
            _portrait         = portrait;
            _numKills         = numKills;
            _numDefeats       = numDefeats;
            _experiencePoints = experiencePoints;
            _minAttackRange   = minAttackRange;
            _maxAttackRange   = maxAttackRange;
            _susceptibleFire  = false;
            _susceptibleIce   = false;
            _resistantFire    = false;
            _resistantIce     = false;
            _canPoison        = false;
            _canDispel        = false;
            _canMuddle        = false;
            _canSlow          = false;
            _canStun          = false;
            _canSleep         = false;
            _gold             = 0;
            _asleep           = 0;
            _poisoned         = false;
            _cursed           = false;
            _stunned          = 0;
            _silenced         = 0;
            _confused         = 0;
            _boosted          = 0;
            _attackBoosted    = 0;
            _agilityBoostedBy = 0;
            _defenseBoostedBy = 0;
            _attackBoostedBy  = 0;
            _hasSpecialAttack = hasSpecialAttack;
            Items             = items;
            ItemEquipped      = itemEquipped;
            MagicSpells       = magicSpells;

            for (int i = 0; i < 8; i++)
            {
                _texture[i] = texture[i];
            }

            PositionStatus = PositionStatuses.LooksDown1;
        }
Exemple #2
0
        // constructor for player party members
        public Character(String name, int level, int levelToDisplay, PromotedStatuses promotedStatus, int numKills, int numDefeats, int experiencePoints, Item[] items, bool[] itemEquipped)
        {
            switch (name)
            {
            case "JACOB":
                Init("JACOB", "SDMN", 1, 1, 12, 12, 6, 4, 8, 8, true, 6, 4, false, true, numKills, numDefeats, experiencePoints, false, items, itemEquipped, new Spell[] { new Spell("BLAZE", 1), null, null, null }, TexturesJacob, TexturesJacob_Portrait);
                break;

            case "CARYN":
                Init("CARYN", "PRST", 1, 1, 11, 11, 6, 5, 10, 10, false, 5, 5, false, true, numKills, numDefeats, experiencePoints, false, items, itemEquipped, new Spell[] { new Spell("HEAL", 1), null, null, null }, TexturesCaryn, TexturesCaryn_Portrait);
                break;

            case "TASSI":
                Init("TASSI", "WARR", 1, 1, 9, 9, 9, 7, 0, 0, false, 5, 4, false, true, numKills, numDefeats, experiencePoints, false, items, itemEquipped, null, TexturesTassi, TexturesTassi_Portrait);
                break;

            case "EVA":
                Init("EVA", "ACHR", 1, 1, 8, 8, 7, 6, 0, 0, false, 5, 4, false, true, numKills, numDefeats, experiencePoints, false, items, itemEquipped, null, TexturesEva, TexturesEva_Portrait);
                break;

            case "HANS":
                Init("HANS", "WARR", 1, 1, 8, 8, 12, 6, 0, 0, false, 5, 4, false, true, numKills, numDefeats, experiencePoints, false, items, itemEquipped, null, TexturesHans, TexturesHans_Portrait);
                break;

            case "MONICA":
                Init("MONICA", "MAGE", 1, 1, 8, 8, 6, 4, 20, 20, false, 6, 3, false, true, numKills, numDefeats, experiencePoints, false, items, itemEquipped, new Spell[] { new Spell("BLAZE", 1), null, null, null }, TexturesMonica, TexturesMonica_Portrait);
                break;
            }

            if (ItemEquipped != null)
            {
                for (int i = 0; i < MAXNUMBER_ITEMS; i++)
                {
                    if (ItemEquipped[i])
                    {
                        ItemEquipped[i] = false;
                        Equip(i);
                    }
                }
            }

            if (_level == level - levelToDisplay + 1)
            {
                Promote(promotedStatus);
            }

            while (_level < level)
            {
                NextLevel();
                if (_level == level - levelToDisplay + 1)
                {
                    Promote(promotedStatus);
                }
            }

            _hitPoints   = _maxHitPoints;
            _magicPoints = _maxMagicPoints;
        }
Exemple #3
0
 // constructor for player party members
 public Character(String name, String charClass, int level, int levelToDisplay, PromotedStatuses promotedStatus, int hitPoints, int maxHitPoints, int attackPoints, int defensePoints, int magicPoints, int maxMagicPoints, bool mustSurvive, int movePoints, int agility, bool flying, bool alive, int numKills, int numDefeats, int experiencePoints, int minAttackRange, int maxAttackRange, bool hasSpecialAttack, Item[] items, bool[] itemEquipped, Spell[] magicSpells, Texture2D[] texture, Texture2D portrait)
 {
     Init(name, charClass, level, levelToDisplay, promotedStatus, hitPoints, maxHitPoints, attackPoints, defensePoints, magicPoints, maxMagicPoints, mustSurvive, movePoints, agility, flying, alive, numKills, numDefeats, experiencePoints, minAttackRange, maxAttackRange, hasSpecialAttack, items, itemEquipped, magicSpells, texture, portrait);
 }
Exemple #4
0
 // general constructor
 public Character(String name, String charClass, int level, int levelToDisplay, PromotedStatuses promotedStatus, int hitPoints, int maxHitPoints, int attackPoints, int defensePoints, int magicPoints, int maxMagicPoints, bool mustSurvive, bool boss, int movePoints, int agility, bool flying, bool alive, int numKills, int numDefeats, int experiencePoints, int minAttackRange, int maxAttackRange, bool susceptibleFire, bool susceptibleIce, bool resistantFire, bool resistantIce, bool canPoison, bool canDispel, bool canMuddle, bool canSlow, bool canStun, bool canSleep, bool hasSpecialAttack, int gold, Item[] items, bool[] itemEquipped, Spell[] magicSpells, Texture2D[] texture, Texture2D portrait)
 {
     Init(name, charClass, level, levelToDisplay, promotedStatus, hitPoints, maxHitPoints, attackPoints, defensePoints, magicPoints, maxMagicPoints, mustSurvive, boss, movePoints, agility, flying, alive, numKills, numDefeats, experiencePoints, minAttackRange, maxAttackRange, susceptibleFire, susceptibleIce, resistantFire, resistantIce, canPoison, canDispel, canMuddle, canSlow, canStun, canSleep, hasSpecialAttack, gold, items, itemEquipped, magicSpells, texture, portrait);
 }
Exemple #5
0
        public void Promote(PromotedStatuses newPromotedStatus)
        {
            if (_promotedStatus == PromotedStatuses.YesRegular ||
                _promotedStatus == PromotedStatuses.YesAlternative)
            {
                return;         // don't promote twice
            }
            switch (newPromotedStatus)
            {
            case PromotedStatuses.YesRegular:
                switch (_charClass)
                {
                case "ACHR":
                    _charClass   = "SNIP";
                    _movePoints += 1;
                    break;

                case "BDMN":
                    _charClass = "BDBT";
                    break;

                case "KNTE":
                    _charClass = "PLDN";
                    break;

                case "MAGE":
                    _charClass = "WIZ";
                    break;

                case "PHNK":
                    _charClass = "PHNX";
                    break;

                case "PRST":
                    _charClass = "VICR";
                    break;

                case "RNGR":
                    _charClass = "BWNT";
                    break;

                case "SDMN":
                    _charClass = "HERO";
                    break;

                case "THIF":
                    _charClass = "NINJ";
                    break;

                case "TORT":
                    _charClass        = "MNST";
                    _movePoints      += 2;
                    _flying           = true;
                    _hasSpecialAttack = true;
                    break;

                case "WARR":
                    _charClass = "GLDT";
                    break;

                case "WFMN":
                    _charClass = "WFBN";
                    break;
                }
                _levelToDisplay = 1;
                break;

            case PromotedStatuses.YesAlternative:
                switch (_charClass)
                {
                case "ACHR":
                    _charClass = "BRGN";
                    break;

                case "KNTE":
                    _charClass = "PGNT";
                    break;

                case "MAGE":
                    _charClass = "SORC";
                    // *** new spells
                    break;

                case "PRST":
                    _charClass = "MMNK";
                    if (Items != null && ItemEquipped != null)
                    {
                        for (int i = 0; i < MAXNUMBER_ITEMS; i++)
                        {
                            if (Items[i].Type == Item.Types.Weapon &&
                                ItemEquipped[i])
                            {
                                Unequip(i);
                            }
                        }
                    }
                    break;

                case "WARR":
                    _charClass   = "BRN";
                    _movePoints += 1;
                    break;
                }
                _levelToDisplay = 1;
                break;
            }

            _promotedStatus = newPromotedStatus;
        }