예제 #1
0
        //skal bruge et array af data for at oprette en entity, kaldet data
        //0 er navn, 1 er level, 2 er health, 3 er mana, 4 er pdamage, 5 er mdamage, 6 er resist
        public Entity(string name, int lvl, int health, int mana, int pDamage, int mDamage, Resist res, int dodge, Skill[] skills, string pic)
        {
            _name  = name;
            _level = lvl;

            _maxHealth = health;
            _maxMana   = mana;
            _health    = _maxHealth;
            _mana      = _maxMana;

            _physicalDamage = pDamage;
            _magicalDamage  = mDamage;
            _critChance     = 0; //placeholder
            _res            = res;
            _dodge          = dodge;

            _knownSkills = skills.ToList();
            _isBlocking  = false;
            _effects     = new List <Effect>();

            _state       = 4;
            _turnsFrozen = 0;

            _pic = pic;
        }
예제 #2
0
 public Item(string name, string type, Damage dmg, int bonusHealth, int bonusMana, int bonusPhysicalDamage, int bonusMagicalDamage, Resist bonusResist,
             int bonusDodge, int cDurabiliy, int mDurability, Effect script, string image, string lore)
 {
     Name                = name;
     Type                = type;
     Dmg                 = dmg;
     BonusHealth         = bonusHealth;
     BonusMana           = bonusMana;
     BonusPhysicalDamage = bonusPhysicalDamage;
     BonusMagicalDamage  = bonusMagicalDamage;
     BonusResist         = bonusResist;
     BonusDodge          = bonusDodge;
     CurrentDurability   = cDurabiliy;
     MaxDurability       = mDurability;
     Image               = image;
     Lore                = lore;
 }
예제 #3
0
        public Entity(Entity blueprint)
        {
            _name           = blueprint.GetName();
            _level          = blueprint.GetLevel();
            _health         = blueprint.GetMaxHealth();
            _maxHealth      = blueprint.GetMaxHealth();
            _mana           = blueprint.GetMaxMana();
            _maxMana        = blueprint.GetMaxMana();
            _physicalDamage = blueprint.GetpBonus();
            _magicalDamage  = blueprint.GetmBonus();
            _critChance     = blueprint.GetCriticalChance();
            _res            = blueprint.GetResistances();
            _dodge          = blueprint.GetDodge();
            _isBlocking     = false;
            _knownSkills    = blueprint._knownSkills;
            _pic            = blueprint.GetPic();
            _state          = 4; //Alive

            _effects = new List <Effect>();
        }
예제 #4
0
 public Enemy(string name, int lvl, int health, int mana, int pdamage, int mdamage, Resist res, int dodge, Skill[] skills, Item[] iReward, int gReward, int eReward, int areaId, string pic)
     : base(name, lvl, health, mana, pdamage, mdamage, res, dodge, skills, pic)
 {
     _experienceReward = eReward;
     _goldReward       = gReward;
     _lootReward       = iReward;
     _areaId           = areaId;
 }
예제 #5
0
        private List <int> _eventsTouched; //markers for special options in events/quests

        public Player(string name, int lvl, int health, int mana, int pdamage, int mdamage, Resist res, int dodge, Skill[] skills, PlayerAttributes att,
                      List <int> currentQuests, List <int> completedQuests, List <int> eventsTouched, int gold, int exp, string pic)
            : base(name, lvl, health, mana, pdamage, mdamage, res, dodge, skills, pic)
        {
            _experiencePoints = exp;
            _gold             = gold;
            Att              = att;
            _currentQuests   = currentQuests;
            _completedQuests = completedQuests;
            _eventsTouched   = eventsTouched;
        }