Esempio n. 1
0
    public void HealUnit(int value, Skill.Actions action)
    {
        Debug.Log("Healing: " + GetData().characterMoniker + " for " + value.ToString());
        int nwHlth = GetData().GetCurrHealth() + value;

        nwHlth = nwHlth > GetData().GetMaxHP() ? GetData().GetMaxHP() : nwHlth;
        if (nwHlth != GetData().GetCurrHealth())
        {
            GetData().SetCurrHealth(nwHlth);
            //FloatUp(action, "+" + value.ToString(), Color.green, "Unit Healed", false);
            HealAnim(AnimationInteractionController.ReturnWaitTime(action));
        }
    }
Esempio n. 2
0
    public static float ReturnWaitTimeDialog(Skill.Actions interaction)
    {
        switch (interaction)
        {
        case Skill.Actions.DidKill: return(AFTER_KILL);

        case Skill.Actions.DidAttack: return(NO_ATK_WAIT);

        case Skill.Actions.DidDefend: return(ATK_WAIT);

        default: return(0);
        }
    }
Esempio n. 3
0
    public void AcceptAction(Skill.Actions action, UnitProxy u1, UnitProxy u2, List <TileProxy> path)
    {
        //Debug.Log("Cycling through skills: " + GetSkills().Length.ToString());
        var gSkills = GetSkills().GroupBy(skill => skill);

        foreach (var skill in gSkills)
        {
            Skill tSkill = Skill.ReturnSkillByString((Skill.SkillClasses)Enum.Parse(typeof(Skill.SkillClasses), skill.Key));
            tSkill.value = skill.Count();
            if (tSkill != null)
            {
                tSkill.RouteBehavior(action, u1, u2, path);
            }
        }
    }
Esempio n. 4
0
    static string GetFinalCatchphrase(Skill.Actions act)
    {
        string[] phrases = new string[] { "death..." };
        switch (act)
        {
        //OnSelected
        case Skill.Actions.None: phrases = new string[] { "doom...", "la la la", "shiny", "cute", "where are you guys?" }; break;

        case Skill.Actions.DidAttack: phrases = new string[] { ":)", "are you mommy?", "you'll be my toy", "i see you", "peekaboo" }; break;

        case Skill.Actions.DidDefend: phrases = new string[] { ":|", "ouchie", "that hurts", "that's not fair", "i'll tell on you" }; break;

        case Skill.Actions.DidKill: phrases = new string[] { ";)", "death is my present", "let's play again", "that was fun", "i'm bored with you" }; break;
        }
        HelperScripts.Shuffle(phrases);
        return(phrases[0]);
    }
Esempio n. 5
0
    /*
     * Catch phrases can contain as much as 20 characters
     */
    public static string GenerateRandomCatchphrase(Skill.Actions act, Unit.FactionType faction)
    {
        switch (faction)
        {
        case Unit.FactionType.Human:
            return(GetHumanCatchphrase(act));

        case Unit.FactionType.Egypt:
            return(GetEgyptCatchphrase(act));

        case Unit.FactionType.Cthulhu:
            return(GetCthulhuCatchphrase(act));

        default:
            return(GetFinalCatchphrase(act));
        }
    }
Esempio n. 6
0
 public void ReceiveAtkBuff(int buff, Skill.Actions action = Skill.Actions.None)
 {
     GetData().SetAttackBuff(GetData().GetAttackBuff() + buff);
     //int newAtk = GetData().GetAttack() + buff;
     if (buff != 0)
     {
         if (buff > 0)
         {
             RageAnim(AnimationInteractionController.ReturnWaitTime(action));
             //FloatUp(action, "+" + buff + " atk", Color.blue, "atk buff", false);
         }
         else
         {
             HobbleAnim(AnimationInteractionController.ReturnWaitTime(action));
             //FloatUp(action, "-" + buff + " atk", Color.cyan, "atk sickness", true);
         }
     }
 }
Esempio n. 7
0
    public bool IsAttackedEnvironment(int atkPwr, Skill.Actions act = Skill.Actions.None)
    {
        if (_data.GetAegis())
        {
            SetAegis(false, AnimationInteractionController.ReturnWaitTime(act));
            return(false);
        }

        //Damage the unit
        GetData().IsAttacked(atkPwr);
        //FloatUp("-" + atkPwr.ToString(), Color.red, ATK_WAIT);
        FloatUp(act, "-" + atkPwr.ToString(), Color.red, "Took env damage", true);
        if (GetData().IsDead() && !givenExp)
        {
            givenExp = true;
            BoardProxy.instance.GiveLowestCharLvl(this);
            return(true);
        }
        return(false);
    }
Esempio n. 8
0
    /*
     *
     * Humans say badass murica things
     *
     */
    static string GetHumanCatchphrase(Skill.Actions act)
    {
        string[] phrases = new string[] { "yo" };
        switch (act)
        {
        //OnSelected
        case Skill.Actions.None: phrases = new string[] { "roger", "listening", "standing by", "yo", "copy that", "moving", "walking",
                                                          "hostiles sighted", "investigating", "engaging" }; break;

        case Skill.Actions.DidAttack: phrases = new string[] { "die!", "firing", "eat this!", "burn!", "murica!", "apple pies!", "neutralizing",
                                                               "aiming", "get down!", "boom", "dodge this", "suck on this", "for freedom!", "target acquired" }; break;

        case Skill.Actions.DidDefend: phrases = new string[] { "ouch!", "medic!", "taking damage", "oof", "mommy!", "oops..", "shields down",
                                                               "taking fire", "hamburgers...", "that'll scar", "don't let me die!", "i see the light", "under attack" }; break;

        case Skill.Actions.DidKill: phrases = new string[] { "hoo rah!", "take that!", "enemy down", "who's next?", "and stay down!", "via con dios" }; break;
        }
        HelperScripts.Shuffle(phrases);
        return(phrases[0]);
    }
Esempio n. 9
0
    /*
     *
     * Cthulhu says evil things in latin
     *
     */
    static string GetCthulhuCatchphrase(Skill.Actions act)
    {
        string[] phrases = new string[] { "gurgle" };
        switch (act)
        {
        //OnSelected
        case Skill.Actions.None: phrases = new string[] { "*gurgle*", "*squish*", "*belch*", "opus dei", "ora pro nobis", "nocte",
                                                          "satanas graditur", "imperium", "quia sanguinem", "virgineo removete" }; break;

        case Skill.Actions.DidAttack: phrases = new string[] { "sssss", "*squaaaak*", "omnibus idem", "fiat tenebris", "nova sanguinem",
                                                               "lunam in potestatem", "marcescet", "infirma ad vescendum" }; break;

        case Skill.Actions.DidDefend: phrases = new string[] { "*plop*", "*oop*", "opere et veritate", "fortis et liber", "pax aeterna",
                                                               "deus videt omnia", "maledicentibus vobis", "omnes nos", "per vires sanguis" }; break;

        case Skill.Actions.DidKill: phrases = new string[] { "obiit", "odi et amo", "oleum camino", "omnia cum deo", "omnia omnibus",
                                                             "ordo ab chao", "orbis unum", "excelsior", "per festum", "inanis est", "pars requiescant in", "purgare per tenebras" }; break;
        }
        HelperScripts.Shuffle(phrases);
        return(phrases[0]);
    }
Esempio n. 10
0
    public void SaySomething(Skill.Actions interaction)
    {
        bool isSaying = UnityEngine.Random.Range(0, 10) > 7;

        if (!isSaying)
        {
            return;
        }

        string dialog = UnitNameGenerator.GenerateRandomCatchphrase(interaction, GetData().GetFactionType());

        Color clr = Color.black;

        switch (interaction)
        {
        case Skill.Actions.DidAttack: clr = Color.red; break;

        case Skill.Actions.DidKill: clr = Color.magenta; break;
        }

        AnimationInteractionController.InteractionDialogGameobject(interaction, BoardProxy.instance.GetTileAtPosition(GetPosition()), dialog, clr);
    }
Esempio n. 11
0
    /*
     *
     * Egypt says badass culty things
     *
     */
    static string GetEgyptCatchphrase(Skill.Actions act)
    {
        string[] phrases = new string[] { "phsaw" };
        switch (act)
        {
        //OnSelected
        case Skill.Actions.None: phrases = new string[] { "navigating", "moving", "master?", "yes", "i obey", "for egypt", "swiftly",
                                                          "understood", "flying", "i am commanded", "by the wings of Ra" }; break;

        case Skill.Actions.DidAttack: phrases = new string[] { "sand attack", "scarab stab", "titan punch", "fire jab",
                                                               "whirlwind", "breath of horus", "the styx breathes", "release your soul", "give me your breath", "see your sins",
                                                               "breathe death", "the earth taketh", "fire and sand" }; break;

        case Skill.Actions.DidDefend: phrases = new string[] { "impossible!", "witchcraft!", "mummies...", "unravelled", "beat down",
                                                               "mortal wounds", "unholy beast", "i curse thee", "avenge me", "phsaw" }; break;

        case Skill.Actions.DidKill: phrases = new string[] { "rest", "to eternity", "immense power", "sun's blessing", "back to the earth",
                                                             "eternal peace", "sacrifice made", "death to interlopers" }; break;
        }
        HelperScripts.Shuffle(phrases);
        return(phrases[0]);
    }
Esempio n. 12
0
 //Something is happening with the tile that needs an animation
 public static void InteractionAnimation(Skill.Actions interaction, TileProxy tile, string msg, Color color, string animDesc)
 {
     //Debug.Log("Animation reason: " + animDesc);
     instance.StartCoroutine(instance.FloatUpAnim(msg, color, ReturnWaitTime(interaction), tile.transform));
     //instance.timeLeft = ANIMATION_WAIT_TIME_LIMIT;
 }
Esempio n. 13
0
 public static void InteractionDialogGameobject(Skill.Actions interaction, TileProxy tile, string msg, Color color)
 {
     //Debug.Log("Animation reason: " + animDesc);
     instance.StartCoroutine(instance.DialogAnim(msg, color, ReturnWaitTimeDialog(interaction), tile.GetUnit().transform));
     //instance.timeLeft = ANIMATION_WAIT_TIME_LIMIT;
 }
Esempio n. 14
0
 //Something is happening with the unit that needs an animation
 public static void InteractionAnimation(Skill.Actions interaction, UnitProxy unit, string msg, Color color, string animDesc, bool shakeChar, bool deathConsideration = false)
 {
     //Debug.Log("Animation reason: " + animDesc);
     instance.StartCoroutine(instance.FloatUpAnim(msg, color, ReturnWaitTime(interaction), unit.transform, shakeChar, deathConsideration));
     instance.timeLeft = ANIMATION_WAIT_TIME_LIMIT;
 }
Esempio n. 15
0
    //public void FloatUp(string msg, Color color, float wait){
    //    StartCoroutine(FloatUpAnim(msg, color, wait));
    //}

    public void FloatUp(Skill.Actions interaction, string msg, Color color, string desc, bool shakeChar, bool deathConsideration = false)
    {
        AnimationInteractionController.InteractionAnimation(interaction, this, msg, color, desc, shakeChar, deathConsideration);
    }
Esempio n. 16
0
 public void FloatUp(Skill.Actions interaction, string msg, Color color, string desc)
 {
     AnimationInteractionController.InteractionAnimation(interaction, this, msg, color, desc);
 }
Esempio n. 17
0
 public void AcceptAction(Skill.Actions action, UnitProxy u1)
 {
     _data.AcceptAction(action, this, u1, null);
 }
Esempio n. 18
0
 public void AcceptAction(Skill.Actions action, UnitProxy u1, List <TileProxy> path)
 {
     _data.AcceptAction(action, this, u1, path);
 }