コード例 #1
0
        public Hercules(string nama) : base(nama)
        {
            this.nama = nama;
            level     = 1;
            skills    = new List <Skill>();
            skills.Add(new smite());
            skills.Add(new zealous_accusation());
            skills.Add(new holy_lance());
            skills.Add(new inspiring_cry());

            this.type       = "Melee";
            this.hero       = "hercules";
            this.hero_move  = "idle";
            this.nama       = nama;
            this.maxHp      = 31;
            this.dodge      = 5;
            this.min_damage = 5;
            this.max_damage = 9;
            this.hp         = maxHp;
            speed           = 3;
            hero_equip      = new equip[2];
            hero_equip[0]   = new nothing();
            hero_equip[1]   = new nothing();
            //this.hero_equip[0].nama = "Skull Crusher";
            //this.hero_equip[1].nama = "Beast Sallet";
            //this.hero_equip[0].stat_plus.dmg_max += 7;
            //this.hero_equip[1].stat_plus.def += 8;
        }
コード例 #2
0
        public giantLady(string nama) : base(nama)
        {
            this.nama = nama;
            level     = 1;
            skills    = new List <Skill>();
            skills.Add(new smite());
            skills.Add(new zealous_accusation());
            skills.Add(new holy_lance());
            skills.Add(new inspiring_cry());

            this.type       = "Melee";
            this.hero       = "giantLady";
            this.hero_move  = "idle";
            this.nama       = nama;
            this.maxHp      = 26;
            this.dodge      = 10;
            this.min_damage = 6;
            this.max_damage = 12;
            this.hp         = maxHp;
            speed           = 3;
            hero_equip      = new equip[2];
            hero_equip[0]   = new nothing();
            hero_equip[1]   = new nothing();
            //this.hero_equip[0].nama = "Hatchet";
            //this.hero_equip[1].nama = "Leather Armor";
            //this.hero_equip[0].stat_plus.dmg_min += 5;
            //this.hero_equip[1].stat_plus.def += 9;
        }
コード例 #3
0
        //healer
        public druid(string nama) : base(nama)
        {
            this.level = 1;
            skills     = new List <Skill>();
            skills.Add(new divine_grace());
            skills.Add(new divine_comfort());
            skills.Add(new dazzling_light());
            skills.Add(new judgement());

            this.type       = "Healer";
            this.hero       = "druid";
            this.hero_move  = "idle";
            this.nama       = nama;
            this.maxHp      = 24;
            this.dodge      = 15;
            this.min_damage = 4;
            this.max_damage = 8;
            this.hp         = 24;
            speed           = 4;
            hero_equip      = new equip[2];
            hero_equip[0]   = new nothing();
            hero_equip[1]   = new nothing();
            //this.hero_equip[0].nama = "Great Elf Staff";
            //this.hero_equip[1].nama = "Mythic Robe";
            //this.hero_equip[0].stat_plus.acc += 5;
            //this.hero_equip[1].stat_plus.def += 5;
        }
コード例 #4
0
        //healer
        public IceWoman(string nama) : base(nama)
        {
            this.level = 1;
            skills     = new List <Skill>();
            skills.Add(new divine_grace());
            skills.Add(new divine_comfort());
            skills.Add(new dazzling_light());
            skills.Add(new judgement());

            this.type       = "Healer";
            this.hero       = "iceWoman";
            this.hero_move  = "idle";
            this.nama       = nama;
            this.maxHp      = 20;
            this.dodge      = 10;
            this.min_damage = 4;
            this.max_damage = 8;
            this.hp         = maxHp;
            speed           = 8;
            hero_equip      = new equip[2];
            hero_equip[0]   = new nothing();
            hero_equip[1]   = new nothing();
            //this.hero_equip[0].nama = "Lunar Magic Wand";
            //this.hero_equip[1].nama = "Ice Queen Cloak";
            //this.hero_equip[0].stat_plus.def += 6;
            //this.hero_equip[1].stat_plus.dmg_max += 3;
        }
コード例 #5
0
        public Tony(string nama) : base(nama)
        {
            this.level = 1;
            skills     = new List <Skill>();
            skills.Add(new noxius_blast());
            skills.Add(new incision());
            skills.Add(new battlefield_medicine());
            skills.Add(new bliding_gas());

            this.type       = "Doctor";
            this.hero       = "tonyStark";
            this.hero_move  = "idle";
            this.nama       = nama;
            this.maxHp      = 24;
            this.dodge      = 0;
            this.min_damage = 4;
            this.max_damage = 8;
            this.hp         = maxHp;
            speed           = 4;
            hero_equip      = new equip[2];
            hero_equip[0]   = new nothing();
            hero_equip[1]   = new nothing();
            //this.hero_equip[0].nama = "Tony's googles";
            //this.hero_equip[1].nama = "Iron Suit";
            //this.hero_equip[0].stat_plus.def += 6;
        }
コード例 #6
0
        public aladin(string nama) : base(nama)
        {
            this.level = 1;
            skills     = new List <Skill>();
            skills.Add(new noxius_blast());
            skills.Add(new incision());
            skills.Add(new divine_comfort());
            skills.Add(new bliding_gas());

            this.type       = "Doctor";
            this.hero       = "aladin";
            this.hero_move  = "idle";
            this.nama       = nama;
            this.maxHp      = 22;
            this.dodge      = 15;
            this.min_damage = 4;
            this.max_damage = 7;
            this.hp         = 22;
            speed           = 1;
            hero_equip      = new equip[2];
            hero_equip[0]   = new nothing();
            hero_equip[1]   = new nothing();
            //this.hero_equip[0].nama = "Good Magic Wand";
            //this.hero_equip[1].nama = "Tranquil Robe";
            //this.hero_equip[0].stat_plus.dmg_min += 7;
            //this.hero_equip[1].stat_plus.def += 7;
        }
コード例 #7
0
        public archer(string nama) : base(nama)
        {
            this.level = 1;
            skills     = new List <Skill>();
            skills.Add(new pierce());
            skills.Add(new adders_kiss());
            skills.Add(new captivate());
            skills.Add(new impale());

            this.type       = "Range";
            this.hero       = "archer";
            this.hero_move  = "idle";
            this.nama       = nama;
            this.maxHp      = 20;
            this.dodge      = 28;
            this.min_damage = 5;
            this.max_damage = 10;
            this.hp         = 20;
            speed           = 3;
            hero_equip      = new equip[2];
            hero_equip[0]   = new nothing();
            hero_equip[1]   = new nothing();
            //this.hero_equip[0].nama = "Long Bow";
            //this.hero_equip[1].nama = "Traveler Robe";
            //this.hero_equip[0].stat_plus.dmg_max += 8;
            //this.hero_equip[1].stat_plus.acc += 6;
        }
コード例 #8
0
        //jarak jauh
        public ninja(string nama) : base(nama)
        {
            this.level      = 1;
            this.min_damage = 5;
            this.max_damage = 10;
            this.maxHp      = 33;
            this.dodge      = 20;

            this.hp        = 20;
            this.type      = "Range";
            this.hero_move = "idle";
            this.speed     = 20;
            this.nama      = nama;
            this.hero      = "ninja";
            skills         = new List <Skill>();
            skills.Add(new pierce());
            skills.Add(new adders_kiss());
            skills.Add(new captivate());
            skills.Add(new impale());
            hero_equip    = new equip[2];
            hero_equip[0] = new nothing();
            hero_equip[1] = new nothing();
        }
コード例 #9
0
        public override void mouse_click(object sender, MouseEventArgs e)
        {
            Rectangle mouse = new Rectangle(e.X, e.Y, 1, 1);

            for (int i = 0; i < locSkill.Count; i++)
            {
                Rectangle skill = new Rectangle(locSkill[i], 448, 45, 45);
                if (mouse.IntersectsWith(skill))
                {
                    pilih_attack = i;
                    dmg_min      = player[pilihHero].skills[i].status_skill.dmg_min + "";
                    dmg_max      = player[pilihHero].skills[i].status_skill.dmg_max + "";
                    acc          = player[pilihHero].skills[i].status_skill.acc + "";
                    crit         = player[pilihHero].skills[i].status_skill.crit + "%";
                    prot         = player[pilihHero].skills[i].status_skill.def + "";
                }
            }

            Rectangle rectangeItem = new Rectangle(600, 300, w, h);

            if (mouse.IntersectsWith(rectangeItem))
            {
                if (player[pilihHero].type == dropEquip.type)
                {
                    equip temp = new equip();
                    if (dropEquip.jenis == "armor")
                    {
                        if (player[pilihHero].hero_equip[1] is nothing)
                        {
                            player[pilihHero].hero_equip[1] = dropEquip;
                            w = 1;
                            h = 1;
                        }
                        else
                        {
                            temp = player[pilihHero].hero_equip[1];
                            player[pilihHero].hero_equip[1] = dropEquip;
                            dropEquip = temp;
                        }
                    }
                    else
                    {
                        if (player[pilihHero].hero_equip[0] is nothing)
                        {
                            player[pilihHero].hero_equip[0] = dropEquip;
                            w = 1;
                            h = 1;
                        }
                        else
                        {
                            temp = player[pilihHero].hero_equip[0];
                            player[pilihHero].hero_equip[0] = dropEquip;
                            dropEquip = temp;
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Item Ini hanya bisa di gunakan oleh type : " + dropEquip.type);
                }
            }

            for (int i = 0; i < 2; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    if ((i * 8) + j < battleInv.Count)
                    {
                        if (battleInv[(i * 8) + j] is Inventory)
                        {
                            Rectangle recInv = new Rectangle((int)(640 + j * 61.5), 440 + i * 120, 50, 110);
                            if (recInv.IntersectsWith(mouse))
                            {
                                pilihInv = (i * 8) + j;
                            }
                        }
                    }
                }
            }

            for (int i = 0; i < player.Count; i++)
            {
                Rectangle recPlayer = new Rectangle(player[i].x, 250, 100, 150);
                if (recPlayer.IntersectsWith(mouse))
                {
                    if (pilihInv != -1 && battleInv[pilihInv].item == itemUse.bisa)
                    {
                        battleInv[pilihInv].getEffect(battleInv[pilihInv], player[i]);
                        battleInv[pilihInv].jumlah--;
                        if (battleInv[pilihInv].jumlah <= 0)
                        {
                            battleInv.RemoveAt(pilihInv);
                        }
                        pilihInv = -1;
                    }
                    else
                    {
                        pilihHero = i;

                        dmg_min = player[pilihHero].skills[pilih_attack].status_skill.dmg_min + "";
                        dmg_max = player[pilihHero].skills[pilih_attack].status_skill.dmg_max + "";
                        acc     = player[pilihHero].skills[pilih_attack].status_skill.acc + "";
                        crit    = player[pilihHero].skills[pilih_attack].status_skill.crit + "%";
                        prot    = player[pilihHero].skills[pilih_attack].status_skill.def + "";
                    }
                }
            }
        }