/// <summary>
        /// Removes the Knockdown status emote for creatures that are knocked down (and stands the mini upright).
        /// </summary>
        public static void StandUp(this CreatureBoardAsset asset)
        {
            ActionTimeline knockdownStatusEmote = Menus.GetKnockdownStatusEmote();

            if (knockdownStatusEmote == null)
            {
                Log.Error($"knockdownStatusEmote not found.");
                return;
            }
            bool isStanding = !asset.HasActiveEmote(knockdownStatusEmote);

            if (isStanding)
            {
                Log.Debug($"Asset {asset.GetOnlyCreatureName()} is already knocked up!");
                return;
            }
            asset.Creature.ToggleStatusEmote(knockdownStatusEmote);
        }
예제 #2
0
            public static void KnockDown(List <string> creatureIds)
            {
                ActionTimeline knockdownStatusEmote = Menus.GetKnockdownStatusEmote();

                if (knockdownStatusEmote == null)
                {
                    Log.Error($"knockdownStatusEmote not found.");
                    return;
                }
                bool anyStandingUp = false;

                foreach (string creatureId in creatureIds)
                {
                    CreatureBoardAsset asset = GetCreatureBoardAsset(creatureId);
                    if (asset?.HasActiveEmote(knockdownStatusEmote) == false)
                    {
                        anyStandingUp = true;
                        break;
                    }
                }

                foreach (string creatureId in creatureIds)
                {
                    CreatureBoardAsset asset = GetCreatureBoardAsset(creatureId);
                    if (asset == null)
                    {
                        Log.Error($"KnockDown / creatureId {creatureId} not found.");
                        continue;
                    }

                    if (!anyStandingUp || !asset.HasActiveEmote(knockdownStatusEmote))
                    {
                        asset.Creature.ToggleStatusEmote(knockdownStatusEmote);
                    }
                }
            }