Example #1
0
    private static String FormatMagicSwordAbility(CMD_DATA pCmd)
    {
        // TODO: Move it to an external file
        String abilityName = FF9TextTool.ActionAbilityName(pCmd.sub_no);

        String result;

        if (TryFormatRussianMagicSwordAbility(abilityName, out result))
        {
            return(result);
        }

        String commandTitle = FF9TextTool.BattleCommandTitleText(0);

        switch (Localization.GetSymbol())
        {
        case "JP":
            return($"{abilityName}{commandTitle}");

        case "FR":
        case "IT":
        case "ES":
            return($"{commandTitle}{abilityName}");

        default:
            return($"{abilityName} {commandTitle}");
        }
    }
Example #2
0
        public void Perform()
        {
            if (!_v.Target.CheckUnsafetyOrMiss() || !_v.Target.CanBeAttacked() || _v.Target.HasCategory(EnemyCategory.Humanoid))
            {
                UiState.SetBattleFollowFormatMessage(BattleMesages.CannotEat);
                return;
            }

            if (_v.Target.CurrentHp > _v.Target.MaximumHp / _v.Command.Power)
            {
                UiState.SetBattleFollowFormatMessage(BattleMesages.CannotEatStrong);
                return;
            }

            BattleEnemyPrototype enemyPrototype = BattleEnemyPrototype.Find(_v.Target);
            Byte blueMagicId = enemyPrototype.BlueMagicId;

            _v.Target.Kill();

            if (blueMagicId == 0 || ff9abil.FF9Abil_IsMaster(_v.Caster.PlayerIndex, blueMagicId))
            {
                UiState.SetBattleFollowFormatMessage(BattleMesages.TasteBad);
                return;
            }

            ff9abil.FF9Abil_SetMaster(_v.Caster.PlayerIndex, blueMagicId);
            BattleState.RaiseAbilitiesAchievement(blueMagicId);
            UiState.SetBattleFollowFormatMessage(BattleMesages.Learned, FF9TextTool.ActionAbilityName(blueMagicId));
        }
Example #3
0
    private IEnumerator ApDraw(Int32 id)
    {
        Int32 abilId = this.abilityLearned[id][0];

        this.abilityLearned[id].RemoveAt(0);
        String abilName;
        String spriteName;

        if (abilId < 192)
        {
            abilName   = FF9TextTool.ActionAbilityName(abilId);
            spriteName = "ability_stone";
        }
        else
        {
            abilName = FF9TextTool.SupportAbilityName(abilId - 192);
            PLAYER player = FF9StateSystem.Common.FF9.party.member[id];
            spriteName = ((!ff9abil.FF9Abil_IsEnableSA(player.sa, abilId)) ? "skill_stone_off" : "skill_stone_on");
        }
        this.characterBRInfoHudList[id].AbiltySprite.spriteName = spriteName;
        this.characterBRInfoHudList[id].AbilityLabel.text       = abilName;
        this.abilityLearnedPanelTween[id].TweenIn((Action)null);
        yield return(new WaitForSeconds(1f));

        this.abilityLearnedPanelTween[id].TweenOut(delegate
        {
            this.isReadyToShowNextAbil[id] = true;
        });
        yield break;
    }
Example #4
0
    private void DrawAbilityInfo(AbilityItemHUD abilityHud, Int32 index)
    {
        PLAYER  player = FF9StateSystem.Common.FF9.party.member[_currentPartyIndex];
        Boolean flag   = ff9abil.FF9Abil_HasAp(new Character(player));

        if (flag && player.pa[index] == 0)
        {
            abilityHud.Self.SetActive(false);
            return;
        }

        Int32 index1 = ff9abil._FF9Abil_PaData[player.info.menu_type][index].Id;

        //int num1 = ff9abil._FF9Abil_PaData[player.info.menu_type][index].max_ap;
        if (index1 == 0)
        {
            abilityHud.Self.SetActive(false);
        }
        else
        {
            //int num2 = player.pa[index];
            String  str1;
            String  str2;
            Boolean isShowText;
            if (index1 < 192)
            {
                AA_DATA aaData = FF9StateSystem.Battle.FF9Battle.aa_data[index1];
                str1       = FF9TextTool.ActionAbilityName(index1);
                str2       = "ability_stone";
                isShowText = (aaData.Type & 2) == 0;
            }
            else
            {
                //SA_DATA saData = ff9abil._FF9Abil_SaData[index1 - 192];
                str1       = FF9TextTool.SupportAbilityName(index1 - 192);
                str2       = !ff9abil.FF9Abil_IsEnableSA(player.sa, index1) ? "skill_stone_off" : "skill_stone_on";
                isShowText = true;
            }
            abilityHud.Self.SetActive(true);
            abilityHud.IconSprite.spriteName = str2;
            abilityHud.NameLabel.text        = str1;

            if (flag)
            {
                FF9UIDataTool.DisplayAPBar(player, index1, isShowText, abilityHud.APBar);
            }
            else
            {
                FF9UIDataTool.DisplayAPBar(player, index1, isShowText, abilityHud.APBar);
            }
        }
    }
Example #5
0
    private static String FormatMagicSwordAbility(CMD_DATA pCmd)
    {
        // TODO: Move it to an external file
        String abilityName = FF9TextTool.ActionAbilityName(pCmd.sub_no);

        switch (abilityName)
        {
        case "Огонь":
            return("Огненный клинок");

        case "Огонь II":
            return("Огненный клинок II");

        case "Огонь III":
            return("Огненный клинок III");

        case "Буран":
            return("Ледяной клинок");

        case "Буран II":
            return("Ледяной клинок II");

        case "Буран III":
            return("Ледяной клинок III");

        case "Молния":
            return("Электрический клинок");

        case "Молния II":
            return("Электрический клинок II");

        case "Молния III":
            return("Электрический клинок III");

        case "Био":
            return("Ядовитый клинок");

        case "Вода":
            return("Водный клинок");

        case "Взрыв":
            return("Взрывной клинок");

        case "Судный день":
            return("Клинок Судного дня");
        }

        String str2 = Localization.GetSymbol() == "JP" ? String.Empty : " ";

        return(abilityName + str2 + FF9TextTool.BattleCommandTitleText(0));
    }
Example #6
0
    public void SetBattleCommandTitle(CMD_DATA pCmd)
    {
        String str1 = String.Empty;

        switch (pCmd.cmd_no)
        {
        case 14:
        case 15:
            str1 = FF9TextTool.ItemName(pCmd.sub_no);
            break;

        case 50:
            str1 = pCmd.aa.Name;
            break;

        default:
            if (pCmd.sub_no < 192)
            {
                Int32 id = CmdTitleTable[pCmd.sub_no].MappedId;
                switch (id)
                {
                case 254:         // Magic sword
                    str1 = FormatMagicSwordAbility(pCmd);
                    break;

                case 255:
                    str1 = FF9TextTool.ActionAbilityName(pCmd.sub_no);
                    break;

                case 0:
                    break;

                default:
                    str1 = id >= 192 ? FF9TextTool.BattleCommandTitleText((id & 63) + 1) : FF9TextTool.ActionAbilityName(id);
                    break;
                }
            }
            break;
        }

        if (String.IsNullOrEmpty(str1) || (pCmd.cmd_no == 7 && pCmd.sub_no == 96))
        {
            return;
        }

        SetBattleTitle(str1, 1);
    }
 public static String ActionAbilityName(Int32 abilityId)
 {
     return(FF9TextTool.ActionAbilityName(abilityId));
 }