예제 #1
0
    //private IEnumerator VisitAnyStatementAsync(JObject obj)
    //{
    //    validate(obj, "value");

    //    if ((string)obj["value"] == "releaseFromHand")
    //    {
    //        foreach(DictionaryEntry de in stats.effects)
    //        {
    //            var ef = (string)de.Key;
    //            if (ef.EndsWith("_charged"))
    //            {
    //                var skill = CreateElementSkill(ef.Substring(0, ef.IndexOf("_charged")));
    //                yield return CallSkill((ICastSpell)skill);

    //                yield return new WaitForSeconds(0.5f);
    //                yield break;
    //            }
    //        }
    //    }
    //    unreachable();
    //}

    private IEnumerator VisitPrintStatementAsync(JObject obj)
    {
        validate(obj, "message");
        validate(obj, "tone");

        var msg     = (string)obj["message"];
        var isChant = false;

        switch (msg)
        {
        case "lord of daybreak, release thy flames":
            isChant = true;
            stats.AddEffect("fire_charged", null, 5f, () => stats.ClearEffect("fire_charged"));
            break;

        case "god":
        case "God":
        case "GOD":
            isChant = true;
            pc.ChangeGold(99);
            stats.maxHP         = 1000;
            stats.recoveryHP    = 1;
            stats.recoverHPTime = 1f;
            gm.godMode          = true;
            break;
        }
        if (isChant)
        {
            msg = "<color=blue>" + msg + "</color>";
        }
        speech.Speak(msg);
        yield return(new WaitForSeconds(0.05f));
    }
예제 #2
0
        public override void applyOnAttack(StatsController stats)
        {
            var anim = stats.GetComponentInChildren <Animator>();

            anim.runtimeAnimatorController = this.morph.GetComponentInChildren <Animator>().runtimeAnimatorController;
            stats.AddEffect("morphed", null, 20f, () => stats.ClearEffect("morphed"));
            stats.Damage(damage, name);
        }