Beispiel #1
0
        private static MonsterType RefreshMonsterType(ACD tempCommonData, MonsterType monsterType, bool bAddToDictionary)
        {
            SNORecordMonster monsterInfo = tempCommonData.MonsterInfo;

            if (monsterInfo != null)
            {
                // Force Jondar as an undead, since Diablo 3 sticks him as a permanent ally
                if (c_ActorSNO == 86624)
                {
                    monsterType = MonsterType.Undead;
                }
                else
                {
                    monsterType = monsterInfo.MonsterType;
                }
                // Is this going to be a new dictionary entry, or updating one already existing?
                if (bAddToDictionary)
                {
                    dictionaryStoredMonsterTypes.Add(c_ActorSNO, monsterType);
                }
                else
                {
                    dictionaryStoredMonsterTypes[c_ActorSNO] = monsterType;
                }
            }
            else
            {
                monsterType = MonsterType.Undead;
            }
            return(monsterType);
        }
Beispiel #2
0
 public MonsterInfo( byte[] source, uint index, uint offset )
 {
     HP = source[offset];
     Attack = source[offset + 1];
     Defense = source[offset + 2];
     Speed = source[offset + 3];
     SpAttack = source[offset + 4];
     SpDefense = source[offset + 5];
     Type1 = (MonsterType) source[offset + 6];
     Type2 = (MonsterType) source[offset + 7];
     CatchRate = source[offset + 8];
     BaseXpYield = source[offset + 9];
     EffortYield = (uint) ( source[offset + 10] | ( source[offset + 11] << 8 ) );
     Item1 = (uint) ( source[offset + 12] | ( source[offset + 13] << 8 ) );
     Item2 = (uint) ( source[offset + 14] | ( source[offset + 15] << 8 ) );
     Gender = source[offset + 16];
     StepsToHatch = source[offset + 17];
     BaseFriendship = source[offset + 18];
     LevelUpType = (ExperienceRate) source[offset + 19];
     EggGroup1 = source[offset + 20];
     EggGroup2 = source[offset + 21];
     Ability1 = source[offset + 22];
     Ability2 = source[offset + 23];
     SafariRate = source[offset + 24];
     Color = source[offset + 25];
     Name = NameList.Get( index );
 }
Beispiel #3
0
        public static MonsterVersion3 CreateMonster(MonsterType monsterType)
        {
            switch (monsterType)
            {
            case MonsterType.Horse:
                return(new BitingKickingMonster(10, 5, 5));

            case MonsterType.Orc:
                return(new BitingKickingPunchingMonster(10, 5, 5, 5));

            case MonsterType.Crocodile:
                return(new BitingMonster(10, 5));

            case MonsterType.MikeTyson:
                return(new BitingPunchingMonster(10, 5, 5));

            case MonsterType.Camel:
                return(new KickingMonster(10, 5));

            case MonsterType.Kangaroo:
                return(new KickingPunchingMonster(10, 5, 5));

            case MonsterType.MantisShrimp:
                return(new PunchingMonster(10, 5));

            default:
                throw new ArgumentException();
            }
        }
Beispiel #4
0
 public void KillMonster(MonsterType type, int amount)
 {
     if (monstersKilled.ContainsKey(type))
     {
         monstersKilled[type] += amount;
     }
 }
Beispiel #5
0
 /// <summary>
 /// 初始化一只怪兽
 /// </summary>
 /// <param name="id">标识</param>
 /// <param name="name">名称</param>
 /// <param name="type">类型</param>
 /// <param name="initialHealth">初始生命值</param>
 public Monster(MonsterId id, string name, MonsterType type, long initialHealth = 100)
 {
     Id     = id;
     Name   = name;
     Type   = type;
     Health = initialHealth;
 }
 public MonsterData(Vector3 pos, MonsterType type)
 {
     position[0] = pos.x;
     position[1] = pos.y;
     position[2] = pos.z;
     this.type   = type;
 }
Beispiel #7
0
        public Monster(int level)
        {
            hp        = Math.Log(level + 1) * 50;
            hpPercent = (int)(hp / (Math.Log(level + 1) * 50) * 50);

            switch (level)
            {
            case (int)MonsterType.goblin:
                type = MonsterType.goblin;
                break;

            case (int)MonsterType.girl:
                type = MonsterType.girl;
                break;

            case (int)MonsterType.dracula:
                type = MonsterType.dracula;
                break;

            case (int)MonsterType.zombie:
                type = MonsterType.zombie;
                break;

            case (int)MonsterType.kama:
                type = MonsterType.kama;
                break;

            default:
                type = MonsterType.end;
                break;
            }
        }
 public override bool IsApplicable(TurretType turretType, MonsterType monsterType)
 {
     if (turretType == TurretType.Piercing) {
         return true;
     }
     return false;
 }
Beispiel #9
0
        public async Task <IActionResult> Post(string nameMonster, IFormFile photoMonster,
                                               string lowLevelMonster, string highLevelMonster, string vangkansMonster, string elementMonster)
        {
            try
            {
                if (photoMonster != null)
                {
                    var path = Path.Combine
                               (
                        Directory.GetCurrentDirectory(),
                        "wwwroot",
                        "images",
                        photoMonster.FileName
                               );

                    using (var stream = new FileStream(path, FileMode.Create))
                    {
                        await photoMonster.CopyToAsync(stream);
                    }
                }

                MonsterType mon = new MonsterType(nameMonster, Guid.NewGuid().ToString(),
                                                  highLevelMonster, lowLevelMonster, elementMonster, vangkansMonster);
                MonsterSprite sprite = new MonsterSprite(mon.SpriteID, photoMonster.FileName);

                _iMonsterTypeLogic.NewMonsterType(mon, sprite);
                return(RedirectToAction("Monsterlijst"));
            }
            catch (Exception ex)
            {
                return(Content(ex.ToString()));
            }
        }
Beispiel #10
0
    //单只怪物的创造
    public void CreatOneMonster(MonsterType type)
    {
        GameObject monster = null;

        switch (type)                   //根据类型,选择对应怪物
        {
        case MonsterType.Imp:
            monster = Instantiate(imp);
            break;

        case MonsterType.Zach:
            monster = Instantiate(zach);
            break;

        case MonsterType.BatRider:
            monster = Instantiate(batRider);
            break;

        case MonsterType.DarkenDoctor:
            monster = Instantiate(darkenDoctor);
            break;

        case MonsterType.DarkenViolinist:
            monster = Instantiate(darkenViolinist);
            break;
        }

        //随机生成位置
        int row = Random.Range(left, right);

        monList.Add(monster);
        monster.transform.SetParent(creatVector);
        monster.transform.localPosition = Vector3.zero;
    }
Beispiel #11
0
    public void setMonsterStatus(MonsterType monsterType, bool isReady)
    {
        UserMonsterTO um = getMonster(monsterType);

        um.monsterReady = isReady;
        MarkToSave();
    }
Beispiel #12
0
        public MonsterType GetDetailMon(string id)
        {
            MonsterType monstertype = _monstertyperepo.GetDetailMon(id);

            monstertype.Path = "/images/" + monstertype.Path;
            return(monstertype);
        }
Beispiel #13
0
 public Enemy(MonsterType m, int l, Vector2 pos)
     : base()
 {
     monsterType = m;
     position = pos;
     LayerIndex = l;
 }
Beispiel #14
0
        public static BaseMonster GetRandomMonster(MonsterType type, int stage)
        {
            var monsters = GameInfo.Monsters.Where(x => x.Type == type && x.MinStage <stage && x.MaxStage> stage).ToList();
            var index    = NumberHelper.GetRandom(0, monsters.Count);

            return(monsters[index].Clone());
        }
        public static Monster CreateMonster(MonsterType monsterType)
        {
            switch (monsterType)
            {
            case MonsterType.Horse:
                return(new BitingKickingMonster(10, 6, 6));

            case MonsterType.Orc:
                return(new BitingKickingPunchingMonster(10, 5, 5, 5));

            case MonsterType.Crocodile:
                return(new BitingMonster(10, 8));

            case MonsterType.Cow:
                return(new KickingMonster(7, 7));

            case MonsterType.MikeTyson:
                return(new BitingPunchingMonster(11, 5, 9));

            case MonsterType.Kangaroo:
                return(new KickingPunchingMonster(10, 7, 4));

            case MonsterType.MantisShrimp:
                return(new PunchingMonster(15, 15));

            default:
                throw new ArgumentException();
            }
        }
Beispiel #16
0
 public void UpdateMonster()
 {
     type = monsterPage.monsterList[monsterPage.currentid];
     previousButton.gameObject.SetActive(true);
     nextButton.gameObject.SetActive(true);
     UpdateCurrentMonster();
 }
Beispiel #17
0
        public static string ToCustomString(this MonsterType monsterType)
        {
            switch (monsterType)
            {
            case MonsterType.BaronNashor:
                return("BARON_NASHOR");

            case MonsterType.BlueGolem:
                return("BLUE_GOLEM");

            case MonsterType.Dragon:
                return("DRAGON");

            case MonsterType.RedLizard:
                return("RED_LIZARD");

            case MonsterType.Vilemaw:
                return("VILEMAW");

            case MonsterType.RiftHerald:
                return("RIFTHERALD");

            default:
                return(string.Empty);
            }
        }
Beispiel #18
0
 public Monster(string name, double challengeRating, MonsterType monsterType, int experience)
 {
     Name            = name;
     ChallengeRating = challengeRating;
     MonsterType     = monsterType;
     Experience      = experience;
 }
Beispiel #19
0
    MonsterType[] getLostImmortalMonsters()
    {
        int rand = Random.Range(0, 2);

        MonsterType[] monsters;
        switch (_GameStateHolder._ActivePlayer.LostImmortalKillCount)
        {
        case 0:
            monsters = new MonsterType[] { MonsterType.Wyrm, MonsterType.FireElemental };
            break;

        case 1:
            monsters = new MonsterType[] { MonsterType.Wyvern, MonsterType.WaterElemental };
            break;

        case 2:
            monsters = new MonsterType[] { MonsterType.Dragon, MonsterType.EarthElemental };
            break;

        case 3:
            monsters = new MonsterType[] { MonsterType.Hydra, MonsterType.AirElemental };
            break;

        default:
            monsters = new MonsterType[] { MonsterType.Hydra, MonsterType.AirElemental };
            break;
        }

        if (rand == 0)
        {
            monsters.Reverse();
        }
        return(monsters);
    }
Beispiel #20
0
 public void setMonsterStone(MonsterType type, float maxTime, List <MonsterAbility> abilitys)
 {
     this.type     = type;
     buffCount     = 1;
     this.abilitys = abilitys;
     this.maxTime  = maxTime;
 }
    public void CreateMonster(MonsterType index)
    {
        Debug.Log("CharacterMgr - CreateMonster() MonsterType =" + index);
        bool is_Boss = AccountMgr.GetInstance.GetMonsterInfo[(int)index].IsBoss;

        string name = AccountMgr.GetInstance.GetMonsterInfo[(int)index].Name;
        int    hp   = AccountMgr.GetInstance.GetMonsterInfo[(int)index].Hp;
        int    mp   = AccountMgr.GetInstance.GetMonsterInfo[(int)index].Mp;
        int    atk  = AccountMgr.GetInstance.GetMonsterInfo[(int)index].Atk;
        int    def  = AccountMgr.GetInstance.GetMonsterInfo[(int)index].Def;
        int    exp  = AccountMgr.GetInstance.GetMonsterInfo[(int)index].Exp;

        //int type = 0;
        //if (name == "Orc")
        //    type = (int)MonsterType.eTYPE_MONSTER_ORCE;
        //else if(name == "Troll")
        //    type = (int)MonsterType.eTYPE_MONSTER_TRORR;
        //else if (name == "MK")
        //    type = (int)MonsterType.eTYPE_MONSTER_MK;
        //else if (name == "EK_BOSS")
        //    type = (int)MonsterType.eTYPE_MONSTER_EK_BOSS;

        if (is_Boss)
        {
            if (_Boss == null)
            {
                _Boss = new Monster(name, hp, mp, atk, def, exp);
            }
        }
        else
        {
            Monster monster = new Monster(name, hp, mp, atk, def, exp);
            _Monster.Add(monster);
        }
    }
Beispiel #22
0
 public Monster(string name, double damage, double health, MonsterType type)
 {
     Name   = name;
     Damage = damage;
     Health = health;
     Type   = type;
 }
Beispiel #23
0
    public int getMonsterLastUsed(MonsterType monsterType)
    {
        UserMonsterTO userMonster = getMonster(monsterType);
        DateTime      now         = DateTime.Now.Date;

        return((int)((now - userMonster.monsterLastUsed).TotalDays));
    }
Beispiel #24
0
        public IMonster CreateMonster(MonsterType type)
        {
            switch (type)
            {
            case MonsterType.Deamon:
            {
                return(new Deamon(this.route));
            }

            case MonsterType.Bat:
            {
                return(new Bat(this.route));
            }

            case MonsterType.Witch:
            {
                return(new Witch(this.route));
            }

            case MonsterType.Bird:
            {
                return(new Bird(this.route));
            }

            case MonsterType.Dragon:
            {
                return(new Dragon(this.route));
            }

            default:
            {
                throw new NotSupportedException();
            }
            }
        }
Beispiel #25
0
    public void EncounterRandomMonster(int level)
    {
        monsterType = (MonsterType)Random.Range(0, (int)MonsterType.TOTAL_MONSTER_TYPES);
        switch (monsterType)
        {
        case MonsterType.HUMAN_THUG:
            monster = new HumanThug(level);
            break;

        case MonsterType.BANDIT_GOBLIN:
            monster = new BanditGoblin(level);
            break;

        case MonsterType.CYCLOPS:
            monster = new Cyclops(level);
            break;

        case MonsterType.NECRO_MAGE:
            monster = new NecroMage(level);
            break;

        case MonsterType.PHANTOM:
            monster = new Phantom(level);
            break;

        case MonsterType.SKELETON:
            monster = new Skeleton(level);
            break;

        case MonsterType.ZOMBIE:
            monster = new Zombie(level);
            break;
        }
        ShouldProgress();
    }
Beispiel #26
0
        public MonsterModel(string name, int hp, int gold, int experience, int damage, int hits, int hitPercent,
                            Status status, int critPercent, int abs, int evasion, int magDef, int specialAttack, int runLevel, int magicPercent,
                            MonsterType type, Element[] weaknesses, Element[] resists)
        {
            Name          = name;
            HP            = hp;
            Gold          = gold;
            Experience    = experience;
            Damage        = damage;
            Hits          = hits;
            HitPercent    = hitPercent;
            Status        = status;
            CritPercent   = critPercent;
            Abs           = abs;
            Evasion       = evasion;
            MagDef        = magDef;
            RunLevel      = runLevel;
            MagicPercent  = magicPercent;
            Type          = type;
            Weaknesses    = weaknesses;
            Resists       = resists;
            SpecialAttack = specialAttack;

            if (Resists == null)
            {
                Resists = new [] { Element.None }
            }
            ;
            if (Weaknesses == null)
            {
                Weaknesses = new [] { Element.None }
            }
            ;
        }
Beispiel #27
0
 void showCurrentMonsterItems(MonsterType type)
 {
     if (DressingBar != null)
     {
         DressingBar.showCurrentMonsterItems(type);
     }
 }
Beispiel #28
0
 private MonsterBuilder(string name, double challengeRating, MonsterType monsterType, int experience)
 {
     this.name            = name;
     this.challengeRating = challengeRating;
     this.monsterType     = monsterType;
     this.experience      = experience;
 }
Beispiel #29
0
 public MonsterStats(int attack, int defense, int level, MonsterType type)
 {
     Attack  = attack;
     Defense = defense;
     Level   = level;
     Type    = type;
 }
        public void SetCookies(IEnumerable <string> cookies)
        {
            notNullReference.Check(cookies, "cookies");

            monsterType          = (MonsterType)Enum.Parse(typeof(MonsterType), cookies.ElementAt(0));
            killCountRequirement = Convert.ToInt32(cookies.ElementAt(1));
        }
Beispiel #31
0
        /// <summary>
        /// Get default <c>DamageType</c> of a <c>MonsterType</c>.
        /// </summary>
        /// <param name="mt"></param>
        /// <returns>
        /// Default <c>DamageType</c> of a <c>MonsterType</c> as string
        /// </returns>
        public static string GetDefaultDamageType(this MonsterType mt)
        {
            string damageType;

            switch (mt)
            {
            case MonsterType.Goblin:
            case MonsterType.Troll:
            case MonsterType.Elf:
            case MonsterType.Wizard:
            case MonsterType.Ork:
            case MonsterType.Knight:
            case MonsterType.SpaceMarine:
                damageType = DamageType.Normal.ToString();
                break;

            case MonsterType.Dragon:
                damageType = DamageType.Fire.ToString();
                break;

            case MonsterType.Kraken:
                damageType = DamageType.Water.ToString();
                break;

            default:
                damageType = DamageType.Normal.ToString();
                break;
            }

            return(damageType);
        }
Beispiel #32
0
 void AuraOn(MonsterType addme, float time)
 {
     if (aura != null)
     {
         aura.Enable(addme, time);
     }
 }
Beispiel #33
0
 public void UpdateMonsterFromShortcut(MonsterType monstertype)
 {
     type = monstertype;
     previousButton.gameObject.SetActive(false);
     nextButton.gameObject.SetActive(false);
     UpdateCurrentMonster();
 }
Beispiel #34
0
 public Monster(string name, MonsterSize s, MonsterType mt, int xp)
 {
     pName = name;
     setRace("Monster");
     mSize = s;
     mType = mt;
     xpValue = xp;
 }
 void RpcInstantiateMonsterToClient(MonsterType monsterType)
 {
     if (base.isServer) {
         return;
     }
     MonsterSpawnCommand monsterSpawnCommand = new MonsterSpawnCommand(PlayerManager.Instance.NonActivePlayer.ID, PlayerManager.Instance.ActivePlayer.ID, monsterType);
     PlayerManager.Instance.NonActivePlayer.AddCommand(monsterSpawnCommand);
 }
 public void RPCCommandSpawnMonster(MonsterType type)
 {
     if (!base.isServer) {
         CmdInstantiateMonsterToServer(type);
     } else {
         RpcInstantiateMonsterToClient(type);
     }
 }
    public static float CalculateDamage(float damageValue, TurretType turretType, MonsterType monsterType)
    {
        foreach (DamageModifier modifier in Modifiers()) {
            if (modifier.IsApplicable(turretType, monsterType)) {
                damageValue = modifier.CalculateDamage(turretType, monsterType, damageValue);
            }
        }

        return damageValue;
    }
 public override float CalculateDamage(TurretType turretType, MonsterType monsterType, float currentValue)
 {
     if (monsterType == MonsterType.Fighter) {
         return currentValue * 0.6f;
     }
     if (monsterType == MonsterType.ADC) {
         return currentValue * 0.3f;
     }
     return currentValue;
 }
Beispiel #39
0
 /// <summary>
 /// Instantiates a player.
 /// </summary>
 /// <param name="playerID">Player Identifier.</param>
 /// <param name="monster">Monster.</param>
 /// <param name="controllerType">Controller type.</param>
 /// <param name="controllerNumber">Controller number.</param>
 public void InstantiatePlayer(string playerID, MonsterType monster, ControlType controllerType, int controllerNumber)
 {
     // Instantiate monster prefab
     GameObject go = Instantiate (Resources.Load ("Prefabs/" + monster.ToString())) as GameObject;
     APlayer player = go.GetComponent<APlayer> ();
     player.Logic = this;
     player.PlayerID = playerID;
     player.ControllerType = controllerType;
     player.ControllerNumber = controllerNumber;
     _players.Add (player);
 }
 public static Monster Create(MonsterType type)
 {
     switch (type)
     {
         case MonsterType.Anna:
             return new Anna();
         case MonsterType.Billy:
             return new Billy();
         case MonsterType.Jeremy:
             return new Jeremy();
         default:
             return new Anna();
     }
 }
 public abstract float CalculateDamage(TurretType turretType, MonsterType monsterType, float currentValue);
 // weird redundancy; there is some problem with the init
 public void SetMonsterType(MonsterType monsterType)
 {
     _monsterType = monsterType;
 }
	public void SetOpposition(MonsterType t, iBattleable monster) {
        setOpposition(_Monsters[(int)t], monster);
	}
    /// <summary>
    /// Spawns the minion with a start delay.
    /// </summary>
    /// <param name="numberOfMinions">Number of minions to spawn.</param>
    /// <param name="timeBetween">Time between spawns.</param>
    /// <param name="delay">Delay Time before spawn starts.</param>
    /// <param name="monster">Monster Type to spawn.</param>
    IEnumerator SpawnMinion(int numberOfMinions, float timeBetween, float delay, MonsterType monster)
    {
        for (float timer = delay; timer >= 0; timer -= Time.deltaTime)
            yield return 0;

        StartCoroutine(SpawnMinion(numberOfMinions, timeBetween, monster));
    }
Beispiel #45
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="X">X on game</param>
        /// <param name="Y">Y on game</param>
        /// <param name="parTexture">Texture</param>
        /// <param name="parMonsterType">Type of monster</param>
        public MonsterBoss(int X, int Y, Texture2D parTexture, MonsterType parMonsterType)
            : base(X, Y, parTexture, 10, parMonsterType)
        {
            switch (parMonsterType)
            {
                case MonsterType.Bandit:
                    FirstStrike = true;
                    PoisonStrike = true;
                    ManaBurn = true;
                    DamageBase = 52;
                    HealthMax = 238;
                    break;
                case MonsterType.Goblin:
                    FirstStrike = true;
                    ResistPhysical = 20;
                    ResistMagic = 20;
                    DamageBase = 90;
                    HealthMax = 318;
                    break;
                case MonsterType.Golem:
                    ResistMagic = 75;
                    DamageBase = 75;
                    HealthMax = 318;
                    break;
                case MonsterType.Gorgon:
                    FirstStrike = true;
                    DeathGaze = 100;
                    DamageBase = 75;
                    HealthMax = 190;
                    break;
                case MonsterType.Dragon:
                    MagicAttack = true;
                    DamageBase = 75;
                    HealthMax = 477;
                    break;
                case MonsterType.Serpent:
                    PoisonStrike = true;
                    DamageBase = 75;
                    HealthMax = 318;
                    break;
                case MonsterType.Zombie:
                    Undead = true;
                    DamageBase = 75;
                    HealthMax = 636;
                    break;
                case MonsterType.Goat:
                    ResistMagic = 60;
                    DamageBase = 225;
                    HealthMax = 159;
                    break;
                case MonsterType.MeatMan:
                    DamageBase = 48;
                    HealthMax = 954;
                    break;
                case MonsterType.Wraith:
                    Undead = true;
                    MagicAttack = true;
                    ManaBurn = true;
                    ResistPhysical = 60;
                    DamageBase = 75;
                    HealthMax = 238;
                    break;
                case MonsterType.Goo:
                    ResistPhysical = 75;
                    DamageBase = 75;
                    HealthMax = 318;
                    break;
                case MonsterType.Warlock:
                    MagicAttack = true;
                    DamageBase = 112;
                    HealthMax = 318;
                    break;
            }

            HealthCurrent = HealthMax;
        }
Beispiel #46
0
    void setOppositionC(MonsterType t){
        _oppositionReserveC = _MonsterManager.NewMonster(t);
        _BattleUnitPositionManager.SetReserveOppositionC(t, _oppositionReserveC);
	}
Beispiel #47
0
	void setOpposition(MonsterType t) {
        _oppositionBattler = _MonsterManager.NewMonster(t);
		Audio.AudioInstance.PlaySFX(_oppositionBattler.GetAttackSound());
        _BattleUnitPositionManager.SetOpposition(t, _oppositionBattler);
		
	}
 public override bool IsApplicable(TurretType turretType, MonsterType monsterType)
 {
     return turretType == TurretType.Siege;
 }
Beispiel #49
0
 public CachedSNOEntry(int sno, String internalname, ActorType? actortype=null, TargetType? targettype=null, MonsterType? monstertype=null, MonsterSize? monstersize=null, float? collisionradius=null, bool? canburrow=null, bool? grantsnoxp=null, bool? dropsnoloot=null, bool? isbarricade=null, ObstacleType? obstacletype=null, float? actorsphereradius=null, GizmoType? gizmotype=null)
     : base(sno, internalname, actortype, targettype, monstertype, monstersize, collisionradius, canburrow, grantsnoxp, dropsnoloot, isbarricade, obstacletype, actorsphereradius, gizmotype)
 {
 }
Beispiel #50
0
 public SNO(int sno, String internalname, ActorType? actortype=null, TargetType? targettype=null, MonsterType? monstertype=null, MonsterSize? monstersize=null, float? collisionradius=null, bool? canburrow=null, bool? grantsnoxp=null, bool? dropsnoloot=null, bool? isbarricade=null, ObstacleType? obstacletype=null, float? actorsphereradius=null, GizmoType? gimzotype=null)
 {
     //Creates the perm data
              SNOID=sno;
              _actortype=actortype;
              _targettype=targettype;
              _collisionradius=collisionradius;
              _monstersize=monstersize;
              _monstertype=monstertype;
              _internalname=internalname;
              _CanBurrow=canburrow;
              _DropsNoLoot=dropsnoloot;
              _GrantsNoXP=grantsnoxp;
              _IsBarricade=isbarricade;
              _obstacletype=obstacletype;
              _actorsphereradius=actorsphereradius;
              _gizmotype=gimzotype;
              //_RunningRate=runningrate;
              IsFinalized=true;
 }
Beispiel #51
0
            /// <summary>
            /// Constructor used by ReferenceActorMeta collection initializer records.
            /// This imports a previously exported set of data.
            /// </summary>
            public ActorMeta(int actorSNO, int monsterSNO, string internalName, int actorType, double radius, int monsterType, int monsterRace, int monsterSize,
                int gizmoType, bool isSummoner, bool isHostile, bool isNPC, int physMeshSNO, int apperanceSNO, int animSetSNO, bool isMerchant, bool isBarracade,
                bool gizmoIsTownPortal, bool gizmoIsPortal, bool gizmoIsDisabledByScript, bool gizmoIsDestructible, int gizmoGrantsNoXp, int gizmoDefaultCharges,
                int gizmoDefaultState, int gizmoDropNoLoot, bool gizmoIsOperatable, bool gizmoIsBarracade, int petType, bool isSummoned, bool isSalvageShortcut,
                int hirelingType, bool isHelper, bool isDefaultHidden, bool isQuestGiver, bool isGizmo, bool isUnit, bool isMonster)
            {
                ActorSNO = actorSNO;
                MonsterSNO = monsterSNO;
                InternalName = internalName;
                ActorType = (ActorType)actorType;
                Radius = radius;
                MonsterType = (MonsterType)monsterType;
                MonsterRace = (MonsterRace)monsterRace;
                MonsterSize = (MonsterSize)monsterSize;
                GizmoType = (GizmoType)gizmoType;
                IsSummoner = isSummoner;
                IsHostile = isHostile;
                IsNPC = isNPC;
                PhysMeshSNO = physMeshSNO;
                ApperanceSNO = apperanceSNO;
                AnimSetSNO = animSetSNO;
                IsMerchant = isMerchant;
                IsBarracade = isBarracade;
                GizmoIsTownPortal = gizmoIsTownPortal;
                GizmoIsPortal = gizmoIsPortal;
                GizmoIsDisabledByScript = gizmoIsDisabledByScript;
                GizmoIsDestructible = gizmoIsDestructible;
                GizmoGrantsNoXp = gizmoGrantsNoXp;
                GizmoDefaultCharges = gizmoDefaultCharges;
                GizmoDefaultState = gizmoDefaultState;
                GizmoDropNoLoot = gizmoDropNoLoot;
                GizmoIsOperatable = gizmoIsOperatable;
                GizmoIsBarracade = gizmoIsBarracade;
                PetType = petType;
                IsSummoned = isSummoned;
                IsSalvageShortcut = isSalvageShortcut;
                HirelingType = (HirelingType) hirelingType;
                IsHelper = isHelper;
                IsDefaultHidden = isDefaultHidden;
                IsQuestGiver = isQuestGiver;
                IsGizmo = isGizmo;
                IsUnit = isUnit;
                IsMonster = isMonster;

                _isPartial = false;
                _isValid = true;
            }
Beispiel #52
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="X">X on game</param>
        /// <param name="Y">Y on game</param>
        /// <param name="parTexture">Texture</param>
        /// <param name="parLevel">Level of monster</param>
        /// <param name="parMonsterType">Type of monster</param>
        public Monster(int X, int Y, Texture2D parTexture, int parLevel, MonsterType parMonsterType)
            : base(X, Y, parTexture)
        {
            Level = parLevel;
            HealthMax = (Level + 3) * (Level + 3) - 10;
            DamageBase = (Level * Level / 2) + (5 * Level / 2);
            MonsterType = parMonsterType;

            switch (parMonsterType)
            {
                case MonsterType.Bandit:
                    DamageBase = DamageBase * 70 / 100;
                    HealthMax = HealthMax * 80 / 100;
                    PoisonStrike = true;
                    ManaBurn = true;
                    break;
                case MonsterType.Goblin:
                    DamageBase = DamageBase * 120 / 100;
                    FirstStrike = true;
                    break;
                case MonsterType.Golem:
                    ResistMagic += 50;
                    break;
                case MonsterType.Gorgon:
                    HealthMax = HealthMax * 70 / 100;
                    FirstStrike = true;
                    DeathGaze += 50;
                    break;
                case MonsterType.Dragon:
                    HealthMax = HealthMax * 125 / 100;
                    MagicAttack = true;
                    break;
                case MonsterType.Serpent:
                    PoisonStrike = true;
                    break;
                case MonsterType.Zombie:
                    HealthMax = HealthMax * 150 / 100;
                    Undead = true;
                    break;
                case MonsterType.Goat:
                    HealthMax = HealthMax * 75 / 100;
                    ResistMagic += 25;
                    break;
                case MonsterType.MeatMan:
                    DamageBase = DamageBase * 65 / 100;
                    HealthMax = HealthMax * 200 / 100;
                    break;
                case MonsterType.Wraith:
                    HealthMax = HealthMax * 75 / 100;
                    Undead = true;
                    MagicAttack = true;
                    ManaBurn = true;
                    ResistPhysical += 30;
                    break;
                case MonsterType.Goo:
                    ResistPhysical = 50;
                    break;
                case MonsterType.Warlock:
                    DamageBase = DamageBase * 135 / 100;
                    MagicAttack = true;
                    break;

            }

            HealthCurrent = HealthMax;
        }
 public abstract bool IsApplicable(TurretType turretType, MonsterType monsterType);
Beispiel #54
0
	MonsterType[] getLostImmortalMonsters() {
		int rand = Random.Range(0,2);
		MonsterType[] monsters;
		switch(_GameStateHolder._ActivePlayer.LostImmortalKillCount) {
			case 0:
				monsters = new MonsterType[] { MonsterType.Wyrm, MonsterType.FireElemental };
				break;
			case 1:
				monsters = new MonsterType[] { MonsterType.Wyvern, MonsterType.WaterElemental };
				break;
			case 2:
				monsters = new MonsterType[] { MonsterType.Dragon, MonsterType.EarthElemental };
				break;
			case 3:
				monsters = new MonsterType[] { MonsterType.Hydra, MonsterType.AirElemental };
				break;
			default:
				monsters = new MonsterType[] { MonsterType.Hydra, MonsterType.AirElemental };
				break;
		}

		if(rand == 0) {
			monsters.Reverse();
		}
		return monsters;
	}
    IEnumerator SpawnMinion(int n, float t, MonsterType m)
    {
        for (int i = 0; i < n; i++) {
            for (float timer = t; timer >= 0; timer -= Time.deltaTime)
                yield return 0;

            switch(m) {
            case MonsterType.NormalMinion:
                SpawnNormalMinion();
                break;
            case MonsterType.FastMinion:
                SpawnFastMinion();
                break;
            case MonsterType.AirMinion:
                SpawnAirMinion();
                break;
            case MonsterType.HeavyMinion:
                SpawnHeavyMinion();
                break;
            case MonsterType.Boss:
                SpawnBoss();
                break;
            }
        }

        DoneSpawningWave = true;
    }
Beispiel #56
0
 public Monster(int snoID, int monsterCategory, int race, int type, int powerType, 
     int resists)
     : base(snoID, (int)ActorCategory.Monster, (int)TeamType.Hostile)
 {
     MonsterCategory = (MonsterCategory)monsterCategory;
     MonsterRace = (MonsterRace)race;
     MonsterType = (MonsterType)type;
     PowerType = (MonsterPowerType)powerType;
     Resists = (Resistance)resists;
 }
Beispiel #57
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="type">Type of monster to build</param>
        public Monster(MonsterType type, Map.Points.SpawnPoint spawnPoint)
        {
            // Assign type
            this.type = type;

            // Default values
            this.location = null;
            this.orientation = MonsterOrientation.NULL;
            this.step = 1;
            this.stepCounter = 1;

            // Basic location (spawn point)
            this.x = spawnPoint.X;
            this.y = spawnPoint.Y;

            // Type-dependant values
            String name;
            switch (type)
            {
                case MonsterType.CHELL:
                    this.strenghArmor = 20;
                    this.magicArmor = 5;
                    this.health = 100;
                    this.money = 20;
                    name = "Chell\\";
                    break;
                default:
                    this.strenghArmor = 0;
                    this.magicArmor = 0;
                    this.health = 1;
                    this.money = 0;
                    name = "";
                    break;
            }

            // Prepare visual control
            Dictionary<int,String> images = new Dictionary<int,string>();
            images.Add(11, Monster.baseFolder + name + "fl1.png");
            images.Add(12, Monster.baseFolder + name + "fl2.png");
            images.Add(13, Monster.baseFolder + name + "fl3.png");
            images.Add(14, Monster.baseFolder + name + "fl4.png");
            images.Add(21, Monster.baseFolder + name + "fr1.png");
            images.Add(22, Monster.baseFolder + name + "fr2.png");
            images.Add(23, Monster.baseFolder + name + "fr3.png");
            images.Add(24, Monster.baseFolder + name + "fr4.png");
            images.Add(31, Monster.baseFolder + name + "rl1.png");
            images.Add(32, Monster.baseFolder + name + "rl2.png");
            images.Add(33, Monster.baseFolder + name + "rl3.png");
            images.Add(34, Monster.baseFolder + name + "rl4.png");
            images.Add(41, Monster.baseFolder + name + "rr1.png");
            images.Add(42, Monster.baseFolder + name + "rr2.png");
            images.Add(43, Monster.baseFolder + name + "rr3.png");
            images.Add(44, Monster.baseFolder + name + "rr4.png");

            // Add visual control to UI
            Application.Current.Dispatcher.BeginInvoke((Action)delegate()
            {
                this.control = new View.Control.MonsterControl(images,27,68);
                this.control.move(x, y);
                this.control.changeImage(11);
                this.control.changeZIndex(5);
            });

            // Associate linked location
            this.location = spawnPoint.getExactLocation();
            this.moveManager = null;

            // Add to Tickable list
            GameEngine.GameManager.Instance.clockRegister(this);
        }
 public AnimatorOverrideController GetMonsterAnimator(MonsterType monsterType)
 {
     return monsterAnimatorsDict[monsterType];
 }
 public MonsterSpawnCommand(PlayerId owner, PlayerId enemy, MonsterType type)
 {
     _type = type;
     _owner = owner;
     _enemy = enemy;
 }
    public void SetReserveOppositionC(MonsterType t, iBattleable monster)
    {
        GameObject g = _Monsters[(int)t];
        _ReserveOppositionC = (GameObject)Instantiate(g, _MarkerReserveOppositionC.transform.position, _MarkerReserveOppositionC.transform.rotation);

        //battle unit ui 
        GameObject unitUI = _UnitUIPool.GetPooledObject();
        awakenUnitUI(unitUI, _MarkerReserveOppositionC, _ReserveOppositionC);
        _ReserveOppositionCUI = unitUI.GetComponent<BattleUnitUI>();
        _ReserveOppositionCUI.AddUnit(monster);
    }