Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        playerStamina      = FindObjectOfType <PlayerStaminaManager>();
        playerHealthObject = GameObject.Find("Player");
        playerHealth       = playerHealthObject.GetComponent <PlayerHealthManager>();
        playerRanged       = playerHealthObject.GetComponent <PlayerRangedAttack>();
        shieldBlockScript  = FindObjectOfType <ShieldBlock>();
        playerStatsScript  = FindObjectOfType <PlayerStats>();

        daggerTextObject  = GameObject.Find("DaggerText");
        shieldTextObject  = GameObject.Find("ShieldText");
        shieldImageObject = GameObject.Find("ShieldImage");
        potionText        = GameObject.Find("PotionText").GetComponent <Text>();

        shieldTextObject.SetActive(false);
        shieldImageObject.SetActive(false);

        // daggerImageObject.GetComponent<Image>().Sprite = YourSprite;

        if (!UIExists)
        {
            UIExists = true;
            //DontDestroyOnLoad(transform.gameObject);
        }

        else
        {
            //Destroy(gameObject);
        }

        thePS = GetComponent <PlayerStats>();
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        playerStaminaMan = FindObjectOfType <PlayerStaminaManager>();

        thePlayer = FindObjectOfType <PlayerController>();

        sfxMan = FindObjectOfType <SFXManager>();

        shield = FindObjectOfType <ShieldBlock>();

        thePS = FindObjectOfType <PlayerStats>();

        enemy = FindObjectOfType <EnemyTestScript>();

        playerHealth = FindObjectOfType <PlayerHealthManager>();
        hurtEnemy    = FindObjectOfType <HurtEnemy>();

        enemyHealth = FindObjectOfType <EnemyHealthManager>();

        playerEngagement = FindObjectOfType <EngagedWithPlayer>();

        // enemyStaminaMan = FindObjectOfType<EnemyStaminaManager>();

        deathStrike = false;

        showBlood          = false;
        playerStaminaDrain = false;
    }
Beispiel #3
0
        static Config()
        {
            Menu = MainMenu.AddMenu(MenuName, MenuName.ToLower());
            Menu.AddGroupLabel("Welcome to Joker Fiora Addon!");
            Menu.AddLabel("以下是广告无视即可~");
            Menu.AddLabel("Features:");
            Menu.AddLabel("- Epic Combo! 100-0 in 2 seconds.");
            Menu.AddLabel("- Auto Shield Block (W).");
            Menu.AddLabel("- Auto Dispell Channelling Spells (W).");
            Menu.AddLabel("- Harass Mode with all spells.");
            Menu.AddLabel("- Last Hit Mode with Q.");
            Menu.AddLabel("- Lane Clear Mode with Q/E.");
            Menu.AddLabel("- Flee Mode with Q.");
            Menu.AddLabel("- Smart Target Selector.");
            Menu.AddLabel("- Auto-Ignite!");
            Menu.AddLabel("- Champion 1 shot combo indicator!");
            Menu.AddLabel("All customizable! Featuring Youmuu's Ghostblade / Ravenous Hydra / Blade of the Ruined King");
            Menu.AddLabel("Credits to: Danny - Main Coder / Trees - Shield Block / Fluxy - Target Selector 2");

            Modes.Initialize();
            ShieldBlock.Initialize();
            Dispell.Initialize();
            Drawings.Initialize();
            Misc.Initialize();
        }
Beispiel #4
0
    protected override void PreCast()
    {
        CommonOnPreCast();

        CommonOnCastSuccessfully();
        //if not let this be a buff, I should count and end the effect in this script
        //if let a continuous effect be a buff, then create buff instance, use buff manager to count and end
        mc.ChangeMoveSpeed(skillDataInstance.optionalParams[0].value);
        mc.ChangeKnockResist(skillDataInstance.optionalParams[1].value);

        //Enable shield-block, or create the first one
        if (shieldBlock)
        {
            shieldBlock.gameObject.SetActive(true);
        }
        else
        {
            GameObject go = new GameObject("Shield");
            go.transform.SetParent(mc.transform);
            go.layer = LayerMask.NameToLayer("Block");
            go.transform.localPosition = new Vector3(0f, 0f, 0.6f);
            go.transform.localRotation = Quaternion.identity;
            BoxCollider bx = go.AddComponent <BoxCollider>();
            bx.size     = new Vector3(1.5f, 1f, 0.2f);
            shieldBlock = go.AddComponent <ShieldBlock>();
        }

        shieldBlock.InitShield(skillDataInstance.damage);
    }
Beispiel #5
0
 // Use this for initialization
 void Start()
 {
     playerStamina    = FindObjectOfType <PlayerStaminaManager>();
     hurtPlayer       = FindObjectOfType <HurtPlayerUpdated>();
     sfxMan           = FindObjectOfType <SFXManager>();
     playerEngagement = FindObjectOfType <EngagedWithPlayer>();
     playerShield     = FindObjectOfType <ShieldBlock>();
     counter          = 0;
 }
 // Use this for initialization
 void Start()
 {
     playerEngagement  = FindObjectOfType <EngagedWithPlayer>();
     thePlayer         = FindObjectOfType <PlayerController>();
     playerObject      = GameObject.Find("Player");
     playerShield      = thePlayer.GetComponentInChildren <ShieldBlock>();
     thisKnife         = this.gameObject;
     sfxMan            = FindObjectOfType <SFXManager>();
     rangedDeathStrike = false;
 }
    // Use this for initialization
    void Start()
    {
        hurtPlayer = FindObjectOfType <HurtPlayerUpdated>();

        playerStaminaMan = FindObjectOfType <PlayerStaminaManager>();

        thePlayer = FindObjectOfType <PlayerController>();

        sfxMan = FindObjectOfType <SFXManager>();

        shield = FindObjectOfType <ShieldBlock>();

        thePS           = FindObjectOfType <PlayerStats>();
        enemyGameObject = this.gameObject.transform.parent.gameObject;
        enemy           = enemyGameObject.GetComponent <EnemyTestScript>();
        rangedEnemy     = enemyGameObject.GetComponent <BasicRangedEnemy>();
        enemyMaster     = enemyGameObject.GetComponent <EnemyMasterScript>();
        enemyTransform  = enemyGameObject.transform;

        rangedAttack = enemyGameObject.GetComponent <EnemyRangedAttack>();

        playerHealth         = FindObjectOfType <PlayerHealthManager>();
        hurtEnemy            = FindObjectOfType <HurtEnemy>();
        playerShield         = FindObjectOfType <ShieldBlock>();
        hitPoint             = GameObject.Find("Player").transform;
        bloodCounter         = 10;
        deathStrike          = false;
        thePlayerDeathStrike = false;

        playerStaminaDrain = false;

        faceOff = false;

        check = 0;

        beforeRecov = true;

        enemyAttackCounter  = 1f;
        enemyDamagePossible = false;

        preAttack   = false;
        recovAttack = false;

        preAttackCounter   = 0.6f;
        recovAttackCounter = 0.3f;
        enemyAttackCounter = 0.06f;
        freezeFrame        = 1f;
    }
Beispiel #8
0
 public Sentinel()
 {
     heroTexture = Engine.Engine.GetTexture("Hero/Sentinel");
     Hero.loadSprite();
     heroRole            = Classes.Sentinel;
     baseHealth          = 400;
     healthPerLevel      = 65;
     requiredBranchLevel = 30;
     resetLevel();
     resetHealth();
     abilities[0] = new Cleave();
     abilities[1] = new WhirlwindSlash();
     abilities[2] = new ShieldBlock();
     abilities[3] = new ShieldBash();
     Engine.Engine.Log(health.ToString());
     Enemies.Enemy.UpdateTargets(this);
     Enemies.BossEnemy.UpdateBossTargets(this);
 }
Beispiel #9
0
 public Juggernaut()
 {
     heroTexture = Engine.Engine.GetTexture("Hero/Juggernaut");
     Hero.loadSprite();
     heroRole            = Classes.Juggernaut;
     baseHealth          = 500;
     healthPerLevel      = 75;
     requiredBranchLevel = int.MaxValue;
     resetLevel();
     resetHealth();
     abilities[0] = new Cleave();
     abilities[1] = new WhirlwindSlash();
     abilities[2] = new ShieldBlock();
     abilities[3] = new ShieldBash();
     abilities[4] = new Thornmail();
     abilities[5] = new DivineShield();
     Enemies.Enemy.UpdateTargets(this);
     Enemies.BossEnemy.UpdateBossTargets(this);
 }
Beispiel #10
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject == owner.gameObject)
        {
            return;
        }

        Character   cc = other.GetComponent <Character>();
        ShieldBlock sb = other.GetComponent <ShieldBlock>();

        //hit character
        if (cc)
        {
            //general
            cc.Chp.TakeDamage(damage);
            cc.Cmm.AddForce(knockBack, transform.forward);
            //custom
            if (DeleMethod != null)
            {
                DeleMethod(cc);
            }
        }
        //hit shield
        if (sb)
        {
            sb.Owner.Cmm.TriggerShake();
            sb.Owner.Cmm.AddForce(knockBack, transform.forward);
            sb.AbsorbDamage(damage);
        }

        //hit other stuff
        hitEffect.transform.position = this.transform.position;
        hitEffect.SetActive(true);

        belongSkill.PlayRandomSkillAudio(belongSkill.skillDataInstance.hitClips);
        this.gameObject.SetActive(false);
    }
Beispiel #11
0
        static Config()
        {
            Menu = MainMenu.AddMenu(MenuName, MenuName.ToLower());
            Menu.AddGroupLabel("Welcome to Joker Fiora Addon!");
            Menu.AddLabel("Features:");
            Menu.AddLabel("- Epic Combo! 100-0 in 2 saniyede.");
            Menu.AddLabel("- Otomatik (W).");
            Menu.AddLabel("- Otomatik engeller Channelling buyuleri (W).");
            Menu.AddLabel("- Tum buyulerde durtme modu.");
            Menu.AddLabel("- Son vurus modu Q.");
            Menu.AddLabel("- Koridor temizler Q/E.");
            Menu.AddLabel("- Kacis modu Q.");
            Menu.AddLabel("- Akilli hedef secici.");
            Menu.AddLabel("- Oto-Tutustur!");
            Menu.AddLabel("- Sampiyon icin 1 atis kombinasyon gostergesi!");
            Menu.AddLabel("Tumu ozellestirilir! Ozellikler Youmuu / Vahsi Hydra / Mahvolmus");
            Menu.AddLabel("Credits to: Danny - Main Coder / Trees - Shield Block / Fluxy - Target Selector 2");

            Modes.Initialize();
            ShieldBlock.Initialize();
            Dispell.Initialize();
            Drawings.Initialize();
            Misc.Initialize();
        }
Beispiel #12
0
    public Skill CreateSkill()
    {
        Skill skill;

        switch (Type)
        {
        case "swordAttack":
            skill = new SwordAttack(Type, T1, T2, T3, T4, Power, UpgradeWith, Image);
            break;

        case "shieldBlock":
            skill = new ShieldBlock(Type, T1, T2, T3, T4, Power, UpgradeWith, Image);
            break;

        case "heal":
            skill = new Heal(Type, T1, T2, T3, T4, Power, UpgradeWith, Image);
            break;

        default:
            throw new UnityException("Skill type not recognized");
        }

        return(skill);
    }
        static Config()
        {
            Menu = MainMenu.AddMenu(MenuName, MenuName.ToLower());
            Menu.AddGroupLabel("Joker Fiora addonuna hoşgeldin ceviri tradana");
            Menu.AddLabel("Özellikler:");
            Menu.AddLabel("- Epic Combo! 100-0 in 2 seconds.");
            Menu.AddLabel("- Otomatik Blok (W.");
            Menu.AddLabel("- Otomatik Engelleme Büyü Dışındaki Hasarlar (W).");
            Menu.AddLabel("- Dürtme Modunda Her büyüyü kullan.");
            Menu.AddLabel("-  Q ile Son vuruş yap");
            Menu.AddLabel("- Lane Temizleme Modunda Kullan Q/E.");
            Menu.AddLabel("-  Flee Kaçma Modunda Kullan Q.");
            Menu.AddLabel("- Akıllı Hedef Seçme.");
            Menu.AddLabel("- Otomatik Tutuştur!");
            Menu.AddLabel("- Şampiyon 1 vurmada öldürme");
            Menu.AddLabel("Tamamen Özelleştirilebilir! Youumu / Hydra / Mahvolmuş Kılıç");
            Menu.AddLabel("Emeği geçenler to: Danny - Main Coder / Trees - Shield Block / Fluxy - Target Selector 2");

            Modes.Initialize();
            ShieldBlock.Initialize();
            Dispell.Initialize();
            Drawings.Initialize();
            Misc.Initialize();
        }
    // Use this for initialization
    void Start()
    {
        playerStamina      = FindObjectOfType <PlayerStaminaManager>();
        playerHealthObject = GameObject.Find("Player");
        playerHealth       = playerHealthObject.GetComponent <PlayerHealthManager>();
        playerRanged       = playerHealthObject.GetComponent <PlayerRangedAttack>();
        shieldBlockScript  = FindObjectOfType <ShieldBlock>();
        playerStatsScript  = FindObjectOfType <PlayerStats>();

        daggerTextObject  = GameObject.Find("DaggerText");
        shieldTextObject  = GameObject.Find("ShieldText");
        shieldImageObject = GameObject.Find("ShieldImage");
        potionText        = GameObject.Find("PotionText").GetComponent <Text>();

        shieldTextObject.SetActive(false);
        shieldImageObject.SetActive(false);

        if (!UIExists)
        {
            UIExists = true;
        }

        thePS = GetComponent <PlayerStats>();
    }
 // Use this for initialization
 void Start()
 {
     shield = FindObjectOfType <ShieldBlock>();
     thePS  = FindObjectOfType <PlayerStats>();
 }
Beispiel #16
0
    // Use this for initialization
    void Start()
    {
        // dodgeDistanceFloat = 3;
        enemyD = FindObjectOfType <EnemyDialogue>();

        dummyGameObject = GameObject.Find("Dummy Object");
        //rayCastHitDodge.size;
        rayCastDodgeArray = new int[100];

        playerObject    = GameObject.Find("Player");
        playerTransform = playerObject.transform;

        layerMaskPlayerInt = 1 << 9;
        layerMaskPlayer    = ~layerMaskPlayerInt;
        layerMaskBoundsInt = 1 << 10;
        layerMaskBounds    = ~layerMaskBoundsInt;
        layerMaskEnemyInt  = 1 << 11;
        layerMaskEnemy     = ~layerMaskEnemyInt;

        rayDodgeDistance = 4;

        playerStats = FindObjectOfType <PlayerStats>();

        playerShield = FindObjectOfType <ShieldBlock>();

        sfxMan = FindObjectOfType <SFXManager>();

        theDM = FindObjectOfType <DialogueManager>();

        staminaMan = GetComponent <PlayerStaminaManager>();

        enemy = FindObjectOfType <EnemyTestScript>();

        playerHealth = FindObjectOfType <PlayerHealthManager>();

        hurtPlayer = FindObjectOfType <HurtPlayerUpdated>();

        hurtEnemy = FindObjectOfType <HurtEnemy>();

        globalData = FindObjectOfType <GlobalDataScript>();

        playerBoundBoxObject = GameObject.Find("Bounds");

        enemyTargetObject = this.gameObject;
        dmObject          = GameObject.Find("Dialogue Manager");
        theDM             = dmObject.GetComponent <DialogueManager>();

        terrainManager = FindObjectOfType <TerrainManager>();

        damagePossible = false;
        attackPossible = true;
        dashPossible   = true;

        anim        = GetComponent <Animator>();
        myRigidbody = GetComponent <Rigidbody2D>();

        if (!playerExists)
        {
            playerExists = true;
            //DontDestroyOnLoad(transform.gameObject);
        }
        else
        {
            //Destroy(gameObject);
        }

        canMove = true;

        lastMove = new Vector2(globalData.globalPlayerLastMoveX, globalData.globalPlayerLastMoveY);

        currentEnemyExists = true;

        if (boundBox == null)
        {
            //boundBox = FindObjectOfType<BoundsScript>().GetComponent<BoxCollider2D>();
            boundBox  = playerBoundBoxObject.GetComponent <BoxCollider2D>();
            minBounds = boundBox.bounds.min;
            maxBounds = boundBox.bounds.max;
        }

        minBounds = boundBox.bounds.min;
        maxBounds = boundBox.bounds.max;

        deathStrike = false;

        playerOldHealth = playerNewHealth;

        strikeBlock = false;

        strikeBlockCounter = 1f;

        noDamageIsTaken = true;

        preAttack   = false;
        recovAttack = false;

        preAttackCounter   = 0.2f;
        recovAttackCounter = 0.3f;
        attackTimeCounter  = 10;

        attackingCounterNew = 0.06f;

        specialMove = false;

        wasMoving      = false;
        wasSprint      = false;
        sprintTimer    = 0.2f;
        sprintPossible = false;

        // if (globalData.globalPlayerLockOn == 1)
        // {
        //     lockOn = false;
        // }
        // else
        // {
        //     lockOn = false;
        // }

        lockOn          = false;
        newListBool     = true;
        switchEnemyBool = true;

        equipmentBuffManagerScript = FindObjectOfType <EquipmentBuffManager>();

        lockOnImage = GameObject.Find("lockOnImage");
        lockOnImage.SetActive(false);
    }
Beispiel #17
0
        /// <summary>

        /// </summary>
        /// <returns></returns>
        public static PlayerSetup.Player AnkerGuardNpc()
        {
            var Guard = new PlayerSetup.Player
            {
                NPCId        = Guid.NewGuid(),
                Name         = "Lara, the Anker guard",
                NPCLongName  = "Lara the guard stands here keeping watch",
                KnownByName  = true,
                Type         = PlayerSetup.Player.PlayerTypes.Mob,
                Description  = "Dark chain mail armour covers the guard head to toe. A long sword is sheathed at her waist",
                Strength     = 70,
                Dexterity    = 72,
                Constitution = 60,
                Intelligence = 60,
                Wisdom       = 60,
                Charisma     = 60,
                MaxHitPoints = 722,
                HitPoints    = 722,
                Level        = 23,
                Status       = PlayerSetup.Player.PlayerStatus.Standing,
                Skills       = new List <Skill>()
                {
                    Dodge.DodgeAb(),
                ShieldBlock.ShieldBlockAb(),
                Parry.ParryAb(),
                SecondAttack.SecondAttackAb(),
                LongBlades.LongBladesAb(),
                },
                Inventory     = new ItemContainer(),
                Trainer       = false,
                Greet         = true,
                Shop          = false,
                GreetMessage  = "Hello there!",
                DialogueTree  = new List <DialogTree>(),
                Dialogue      = new List <Responses>(),
                Quest         = new List <Quest>(),
                Region        = "Anker",
                Area          = "Anker",
                AreaId        = 37,
                Gender        = "Female",
                SelectedClass = "Fighter",
                ArmorRating   = 280,
                Recall        = new Recall()
                {
                    Region = "Anker",
                    Area   = "Anker",
                    AreaId = 37
                },
                Guard = true,

                PathList = new List <string>()
                {
                    "e",
                    "e",
                    "e",
                    "e",
                    "e",
                    "e",
                    "e",
                    //reverse
                    "w",
                    "w",
                    "w",
                    "w",
                    "w",
                    "w",
                    "w"
                }
            };

            var sword = LongSwordBasic.LongIronSword();

            sword.stats = new Stats()
            {
                damMin = 1,
                damMax = 20
            };
            Guard.Equipment.Wielded = sword.name;
            sword.location          = Item.Item.ItemLocation.Wield;
            Guard.Inventory.Add(sword);


            return(Guard);
        }
Beispiel #18
0
        public static PlayerClass FighterClass()
        {
            var fighter = new PlayerClass
            {
                Name               = "Fighter",
                IsBaseClass        = true,
                ExperienceModifier = 500,
                HelpText           = new Help(),
                Skills             = new List <Skill>(),
                ReclassOptions     = new List <PlayerClass>(),
                MaxHpGain          = 15,
                MinHpGain          = 10,
                MaxManaGain        = 8,
                MinManaGain        = 4,
                MaxEnduranceGain   = 15,
                MinEnduranceGain   = 11,
                StatBonusStr       = 1,
                StatBonusCon       = 1,
            };

            /* TODO: some skills to add
             * Axe Dagger Polearm  Mace
             * Spear Shield Block
             * staff  sword
             *  bash Whip Enhanced damage
             *  parry rescue swim  scrolls
             *  staves  wands  recall
             *  age  dig
             *  dirt kicking
             *  second atttack
             *  third attack
             *  fouth attack
             *  fast healing
             *  kick
             *  disarm
             *  blind fighting
             *  trip
             *  berserk
             *  dual wield (eek)
             * */


            #region  Lvl 1 skills

            var longBlades = LongBlades.LongBladesAb();
            longBlades.Learned = true;
            fighter.Skills.Add(longBlades);

            var shortBlades = ShortBlades.ShortBladesAb();
            shortBlades.Learned = true;
            fighter.Skills.Add(shortBlades);

            var axe = Axe.AxeAb();
            axe.Learned = true;
            fighter.Skills.Add(axe);

            var blunt = BluntWeapons.BluntWeaponsAb();
            blunt.Learned = true;
            fighter.Skills.Add(blunt);

            var polearm = Polearms.PolearmsAb();
            polearm.Learned = true;
            fighter.Skills.Add(polearm);

            var exotic = Exotic.ExoticAb();
            exotic.Learned = true;
            fighter.Skills.Add(exotic);

            var staff = Staff.StaffAb();
            staff.Learned = true;
            fighter.Skills.Add(staff);

            var handToHand = HandToHand.HandToHandAb();
            handToHand.Learned = true;
            fighter.Skills.Add(handToHand);

            var lightArmour = LightArmour.LightArmourAb();
            lightArmour.Learned = true;
            fighter.Skills.Add(lightArmour);



            #endregion

            #region  Lvl 2 skills
            fighter.Skills.Add(HeavyArmour.HeavyArmourAb());
            fighter.Skills.Add(MediumArmour.MediumArmourAb());


            #endregion

            #region Lvl 3 skills
            fighter.Skills.Add(Trip.TripAb());
            #endregion

            #region Lvl 4
            fighter.Skills.Add(FastHealing.FastHealingAb());
            fighter.Skills.Add(Toughness.ToughnessAb());
            #endregion

            #region Lvl 5

            var parry = Parry.ParryAb();
            fighter.Skills.Add(parry);


            #endregion


            #region Lvl 6

            var shieldBlock = ShieldBlock.ShieldBlockAb();
            fighter.Skills.Add(shieldBlock);

            var dodge = Dodge.DodgeAb();
            fighter.Skills.Add(dodge);

            #endregion


            #region Lvl 7

            var dirtKick = DirtKick.DirtKickAb();
            fighter.Skills.Add(dirtKick);

            var kick = Kick.KickAb();
            fighter.Skills.Add(kick);

            #endregion

            #region Lvl 9

            var bash = Bash.BashAb();
            fighter.Skills.Add(bash);



            #endregion


            #region Lvl 10

            var rescue = Rescue.RescueAb();
            fighter.Skills.Add(rescue);



            #endregion

            #region Lvl 11

            var sneak = Sneak.SneakAb();
            fighter.Skills.Add(sneak);



            #endregion


            #region Lvl 12
            fighter.Skills.Add(SecondAttack.SecondAttackAb());



            #endregion


            #region Lvl 13

            var lunge = Lunge.LungeAb();
            fighter.Skills.Add(lunge);



            #endregion


            #region Lvl 14

            var sbash = ShieldBash.ShieldBashAb();
            fighter.Skills.Add(sbash);

            #endregion


            #region Lvl 15

            var disarm = Disarm.DisarmAb();
            fighter.Skills.Add(disarm);

            #endregion


            #region Lvl 16

            var enhancedDam = EnhancedDamage.EnhancedDamageAb();
            fighter.Skills.Add(enhancedDam);

            #endregion

            #region Lvl 18

            var mount = Mount.MountAb();
            fighter.Skills.Add(mount);

            #endregion

            #region Lvl 20

            var thirdAttk = ThirdAttack.ThirdAttackAb();
            fighter.Skills.Add(thirdAttk);

            #endregion



            fighter.ReclassOptions.Add(Ranger.RangerClass());

            return(fighter);
        }