Exemplo n.º 1
0
 private static void CharacterComponent_Dead_Prefix(CharacterComponent __instance, CharacterComponent attacker)
 {
     if (__instance.IsTeamMate())
     {
         ReturnToAI(__instance);
     }
 }
Exemplo n.º 2
0
        private static Boolean AIControl_OnTurnBegin_Prefix_TeamMatePlayerControl(AIControl __instance)
        {
            CharacterComponent character = __instance.CharacterComponent;

            if (character.IsTeamMate())
            {
                if (ChangeToPlayer(character))
                {
                    character.Controller.OnTurnBegin();
                    return(false);
                }
            }

            return(true);
        }
Exemplo n.º 3
0
        private static Boolean PlayerControl_OnBattleEnd_Prefix_TeamMatePlayerControl(PlayerControl __instance)
        {
            CharacterComponent character = __instance.CharacterComponent;

            if (character.IsTeamMate())
            {
                if (ReturnToAI(character))
                {
                    character.Controller.OnBattleEnd();
                    ClearStates();
                    return(false);
                }
            }
            ClearStates();
            return(true);
        }
Exemplo n.º 4
0
        private static Boolean PlayerControl_OnTurnEnd_Prefix_TeamMatePlayerControl(PlayerControl __instance)
        {
            CharacterComponent character = __instance.CharacterComponent;

            if (character.IsTeamMate())
            {
                if (ReturnToAI(character))
                {
                    character.Controller.OnTurnEnd();

                    if (!Game.World.battle.HasPlayerEnemy())
                    {
                        Game.World.battle.UnRegisterAll();
                    }

                    return(false);
                }
            }
            return(true);
        }