private void StealItem(BattleEnemy enemy, Int32 itemIndex) { Byte itemId = enemy.StealableItems[itemIndex]; if (itemId == Byte.MaxValue) { UiState.SetBattleFollowFormatMessage(BattleMesages.CouldNotStealAnything); return; } enemy.StealableItems[itemIndex] = Byte.MaxValue; GameState.Thefts++; BattleItem.AddToInventory(itemId); UiState.SetBattleFollowFormatMessage(BattleMesages.Stole, FF9TextTool.ItemName(itemId)); if (_v.Caster.HasSupportAbility(SupportAbility2.Mug)) { _v.Target.Flags |= CalcFlag.HpAlteration; _v.Target.HpDamage = (Int16)(GameRandom.Next16() % (_v.Caster.Level * _v.Target.Level >> 1)); } if (_v.Caster.HasSupportAbility(SupportAbility1.StealGil)) { GameState.Gil += (UInt32)(GameRandom.Next16() % (1 + _v.Caster.Level * _v.Target.Level / 4)); } }
public static String GetItemName(Int32 index) { if (index < EventEngine.kSItemOfs) { return(FF9TextTool.ItemName(index)); } if (index < EventEngine.kCItemOfs) { return(FF9TextTool.ImportantItemName(index - EventEngine.kSItemOfs)); } return(FF9TextTool.CardName(index - EventEngine.kCItemOfs)); }
private void RemoveItem() { Byte itemId = (Byte)_v.Command.HitRate; if (ff9item.FF9Item_GetCount(itemId) == 0) { UiState.SetBattleFollowFormatMessage(BattleMesages.CouldNotStealAnything); } else { BattleItem.RemoveFromInventory(itemId); UiState.SetBattleFollowFormatMessage(BattleMesages.WasStolen, FF9TextTool.ItemName(itemId)); } }
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 ItemName(Int32 itemId) { return(FF9TextTool.ItemName(itemId)); }
private void DisplayHelp(MainMenuUI.SubMenu currentMenu) { if (currentMenu == MainMenuUI.SubMenu.Ability || currentMenu == MainMenuUI.SubMenu.Order) { foreach (CharacterDetailHUD characterDetailHUD in this.CharacterHUDList) { ButtonGroupState component = characterDetailHUD.Self.GetComponent <ButtonGroupState>(); component.Help.TextKey = ((!FF9StateSystem.MobilePlatform) ? "TargetHelp" : "TargetHelpMobile"); } } else if (currentMenu == MainMenuUI.SubMenu.Equip) { Int32 num = 0; foreach (CharacterDetailHUD characterDetailHUD2 in this.CharacterHUDList) { ButtonGroupState component2 = characterDetailHUD2.Self.GetComponent <ButtonGroupState>(); String text = Localization.Get((!FF9StateSystem.MobilePlatform) ? "TargetHelp" : "TargetHelpMobile") + "\n"; PLAYER player = FF9StateSystem.Common.FF9.party.member[num]; if (player != null) { for (Int32 i = 0; i < 5; i++) { text = text + "[ICON=" + (625 + i).ToString() + "] [FEED=1]:[FEED=2]"; Int32 num2 = (Int32)player.equip[i]; if (num2 != 255) { FF9ITEM_DATA ff9ITEM_DATA = ff9item._FF9Item_Data[num2]; String itemIconSpriteName = "item" + ff9ITEM_DATA.shape.ToString("0#") + "_" + ff9ITEM_DATA.color.ToString("0#"); Int32 key = FF9UIDataTool.IconSpriteName.FirstOrDefault((KeyValuePair <Int32, String> pair) => pair.Value == itemIconSpriteName).Key; String text2 = text; text = String.Concat(new String[] { text2, "[ICON=", key.ToString(), "] [FEED=1]", FF9TextTool.ItemName(num2) }); } if (i < 4) { text += "\n"; } } } component2.Help.TextKey = String.Empty; component2.Help.Text = text; num++; } } else if (currentMenu == MainMenuUI.SubMenu.Status) { Int32 num3 = 0; foreach (CharacterDetailHUD characterDetailHUD3 in this.CharacterHUDList) { ButtonGroupState component3 = characterDetailHUD3.Self.GetComponent <ButtonGroupState>(); String text3 = Localization.Get((!FF9StateSystem.MobilePlatform) ? "TargetHelp" : "TargetHelpMobile") + "\n"; PLAYER player2 = FF9StateSystem.Common.FF9.party.member[num3]; if (player2 != null) { UInt32 exp = (player2.level < 99) ? ff9level.CharacterLevelUps[player2.level].ExperienceToLevel : player2.exp; Int32 num5; if (Localization.language == "English(US)" || Localization.language == "English(UK)" || Localization.language == "German") { num5 = 82; } else { num5 = 64; } String text2 = text3; text3 = String.Concat(new Object[] { text2, Localization.Get("EXP"), "[XTAB=", num5, "]", player2.exp.ToString(), "\n" }); text2 = text3; text3 = String.Concat(new Object[] { text2, Localization.Get("NextLevel"), " [XTAB=", num5, "]", (exp - player2.exp).ToString() }); } component3.Help.TextKey = String.Empty; component3.Help.Text = text3; num3++; } } }