1364 lines
33 KiB
C#
1364 lines
33 KiB
C#
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using Godot;
|
|
using Godot.Bridge;
|
|
using Godot.NativeInterop;
|
|
|
|
[ScriptPath("res://Scripts/UI/DWMenu.cs")]
|
|
public partial class DWMenu : Control
|
|
{
|
|
public enum BoardSides
|
|
{
|
|
Left,
|
|
Right,
|
|
Up,
|
|
Down
|
|
}
|
|
|
|
public enum Menus
|
|
{
|
|
Main,
|
|
Items,
|
|
Equip,
|
|
Magic,
|
|
Settings
|
|
}
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
private Control[] letterBox;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public PartyHUD[] partyHUDs;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Control mainBox;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
private Sprite2D equipMenu;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Control battleBG;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Control bulletBoardPivot;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
private RichTextLabel mainText;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
private RichTextLabel money;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
private RichTextLabel menuDesc;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
private RichTextLabel itemDesc;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public RichTextLabel battleText;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public RichTextLabel tpText;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public RichTextLabel battleText2;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public RichTextLabel battleDesc;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public RichTextLabel[] itemOpt;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Sprite2D soul;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Sprite2D grazeIndicator;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Sprite2D itemArrow;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Sprite2D[] menuButtons;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Sprite2D[] partyHeads;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Sprite2D[] tpBar;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Sprite2D[] partyArrow;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Color[] buttonColors;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Color[] TPColors;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public NinePatchRect bulletBoard;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public NinePatchRect battleCover;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public ShapeCast2D soulHitbox;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Area2D soulGrazebox;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public AnimatedSprite2D battlePortrait;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public CharacterBody2D soulBody;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
private Node2D buttons;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
private ScrollBar scrollBar;
|
|
|
|
public int option;
|
|
|
|
public int subOption;
|
|
|
|
public int maxOption;
|
|
|
|
public int tpVar;
|
|
|
|
public int subberOption;
|
|
|
|
public int selectedParty = -1;
|
|
|
|
public int listLow;
|
|
|
|
private static readonly Texture2D[] menuBg = new Texture2D[2]
|
|
{
|
|
GD.Load<Texture2D>("res://Sprites/Menus/Menu Sprites/PauseEquip.tres"),
|
|
GD.Load<Texture2D>("res://Sprites/Menus/Menu Sprites/PauseMagic.tres")
|
|
};
|
|
|
|
private Menus currentMenu;
|
|
|
|
private Settings settings;
|
|
|
|
private List<Items.IDs> itemList;
|
|
|
|
private int[] acts;
|
|
|
|
private string[] itemListText = new string[48];
|
|
|
|
private float move;
|
|
|
|
public float showHP = -100f;
|
|
|
|
public bool closing;
|
|
|
|
private const float moveTime = 15f;
|
|
|
|
public static readonly Vector2 boardCenter = new Vector2(0f, -35f);
|
|
|
|
public static DWMenu instance;
|
|
|
|
private static readonly int[] itemMenuOptSP = new int[7] { -76, -21, 40, -102, 4, -33, 16 };
|
|
|
|
public const string noItem = "[color=gray] - - - - - - - - - - - - -";
|
|
|
|
private static readonly Acts.IDs[] excludeActs = new Acts.IDs[4]
|
|
{
|
|
Acts.IDs.Check,
|
|
Acts.IDs.KAction,
|
|
Acts.IDs.JAction,
|
|
Acts.IDs.AAction
|
|
};
|
|
|
|
public override void _EnterTree()
|
|
{
|
|
instance = this;
|
|
base.Visible = false;
|
|
scrollBar.max = 48;
|
|
}
|
|
|
|
public override void _Ready()
|
|
{
|
|
base.VisibilityChanged += Opened;
|
|
}
|
|
|
|
private void ShowHP(bool inBattle = false)
|
|
{
|
|
letterBox[1].Position = new Vector2(letterBox[1].Position.X, Mathf.Lerp(letterBox[1].Position.Y, inBattle ? 48 : ((SaveFile.current.activeParty.Count > 3) ? 82 : 90), move / 15f));
|
|
}
|
|
|
|
private void Opened()
|
|
{
|
|
if (base.Visible)
|
|
{
|
|
for (int i = 0; i < Party.party.Count; i++)
|
|
{
|
|
Party.party[i].SetTitle();
|
|
}
|
|
if (SaveFile.current.flags.Contains(SaveFile.Flags.KanakoFollowing) && !SaveFile.current.dwKey.Contains(Items.IDs.KanakoPhone))
|
|
{
|
|
SaveFile.current.dwKey.Add(Items.IDs.KanakoPhone);
|
|
}
|
|
else if (!SaveFile.current.flags.Contains(SaveFile.Flags.KanakoFollowing) && SaveFile.current.dwKey.Contains(Items.IDs.KanakoPhone))
|
|
{
|
|
SaveFile.current.dwKey.Remove(Items.IDs.KanakoPhone);
|
|
}
|
|
CheckItems();
|
|
}
|
|
}
|
|
|
|
private void CheckItems()
|
|
{
|
|
}
|
|
|
|
public override void _Process(double delta)
|
|
{
|
|
if (settings != null)
|
|
{
|
|
if (GodotObject.IsInstanceValid(settings))
|
|
{
|
|
return;
|
|
}
|
|
settings = null;
|
|
mainBox.Visible = false;
|
|
currentMenu = Menus.Main;
|
|
soulBody.Visible = true;
|
|
}
|
|
if (!base.Visible && !(showHP > 0f))
|
|
{
|
|
return;
|
|
}
|
|
BattleDR current = BattleDR.current;
|
|
if ((current != null && current.started) || (FightingGame.instance != null && FightingGame.instance.active))
|
|
{
|
|
tpBar[0].Position = new Vector2(Mathf.Lerp(tpBar[0].Position.X, -140f, 0.2f), -33f);
|
|
}
|
|
else
|
|
{
|
|
tpBar[0].Position = new Vector2(Mathf.Lerp(tpBar[0].Position.X, -180f, 0.2f), -33f);
|
|
}
|
|
if (showHP > 0f || showHP == -200f)
|
|
{
|
|
base.Visible = true;
|
|
if (FightingGame.instance == null || !FightingGame.instance.active)
|
|
{
|
|
ShowHP(BattleDR.current != null);
|
|
}
|
|
if (move < 15f)
|
|
{
|
|
move += Main.deltaTime;
|
|
}
|
|
if (showHP > 0f)
|
|
{
|
|
showHP -= Main.deltaTime;
|
|
}
|
|
return;
|
|
}
|
|
if (showHP > -50f)
|
|
{
|
|
closing = true;
|
|
showHP = -100f;
|
|
move = 15f;
|
|
return;
|
|
}
|
|
if (closing)
|
|
{
|
|
letterBox[0].Position = new Vector2(letterBox[0].Position.X, Mathf.Lerp(letterBox[0].Position.Y, -159f, 1f - move / 15f));
|
|
letterBox[1].Position = new Vector2(letterBox[1].Position.X, Mathf.Lerp(letterBox[1].Position.Y, 122f, 1f - move / 15f));
|
|
if (move > 0f)
|
|
{
|
|
move -= Main.deltaTime;
|
|
return;
|
|
}
|
|
base.Visible = false;
|
|
closing = false;
|
|
return;
|
|
}
|
|
if (move < 15f)
|
|
{
|
|
move += Main.deltaTime;
|
|
}
|
|
else
|
|
{
|
|
if (!soulBody.Visible)
|
|
{
|
|
UpdateMenus();
|
|
}
|
|
soulBody.Visible = true;
|
|
}
|
|
letterBox[0].Position = new Vector2(letterBox[0].Position.X, Mathf.Lerp(letterBox[0].Position.Y, -122f, move / 15f));
|
|
ShowHP();
|
|
switch (currentMenu)
|
|
{
|
|
case Menus.Main:
|
|
if (Input.IsActionJustPressed(Main.keys[2]))
|
|
{
|
|
option--;
|
|
if (option < 0)
|
|
{
|
|
option = maxOption - 1;
|
|
}
|
|
UpdateMenus();
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[3]))
|
|
{
|
|
option++;
|
|
if (option >= maxOption)
|
|
{
|
|
option = 0;
|
|
}
|
|
UpdateMenus();
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[4]))
|
|
{
|
|
switch (option)
|
|
{
|
|
case 0:
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
currentMenu = Menus.Items;
|
|
UpdateMenus();
|
|
break;
|
|
case 1:
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
option = 0;
|
|
currentMenu = Menus.Equip;
|
|
UpdateMenus();
|
|
break;
|
|
case 2:
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
option = 0;
|
|
currentMenu = Menus.Magic;
|
|
UpdateMenus();
|
|
break;
|
|
case 3:
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
Exit();
|
|
Talk.DoTalk();
|
|
break;
|
|
case 4:
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
mainBox.Visible = true;
|
|
mainText.Text = "";
|
|
soulBody.Visible = false;
|
|
mainBox.AddChild(settings = GD.Load<PackedScene>("res://Objects/UI/Settings.tscn").Instantiate<Settings>(PackedScene.GenEditState.Disabled), forceReadableName: false, InternalMode.Disabled);
|
|
settings.Position = new Vector2(68f, 28f);
|
|
break;
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[5]))
|
|
{
|
|
Exit();
|
|
}
|
|
break;
|
|
case Menus.Items:
|
|
if (subberOption == 0)
|
|
{
|
|
soulBody.Position = new Vector2(itemMenuOptSP[subOption], -57f);
|
|
}
|
|
else if (subberOption == -1)
|
|
{
|
|
soulBody.GlobalPosition = partyHUDs[selectedParty].icon.GlobalPosition;
|
|
}
|
|
else
|
|
{
|
|
soulBody.Position = new Vector2((option % 2 == 0) ? itemMenuOptSP[3] : itemMenuOptSP[4], itemMenuOptSP[5] + Mathf.FloorToInt((float)option / 2f) * itemMenuOptSP[6]);
|
|
}
|
|
if (subberOption == 5)
|
|
{
|
|
if (Input.IsActionJustPressed(Main.keys[4]))
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
subOption = 1;
|
|
subberOption = 0;
|
|
SaveFile.current.dwItems.Remove(itemList[option]);
|
|
UpdateMenus();
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[5]))
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
subOption = 1;
|
|
subberOption = 0;
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[4]))
|
|
{
|
|
if (subberOption == 0)
|
|
{
|
|
if ((subOption == 2 && SaveFile.current.dwKey.Count == 0) || (subOption < 2 && SaveFile.current.dwItems.Count == 0))
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[1]);
|
|
break;
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
subberOption = subOption + 1;
|
|
UpdateMenus();
|
|
}
|
|
else if (subberOption > 0)
|
|
{
|
|
if (subOption == 1)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
subberOption = 5;
|
|
UpdateMenus();
|
|
}
|
|
else if (Texts.items[itemList[option]].cantUse)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[1]);
|
|
}
|
|
else if (Texts.items[itemList[option]].instantUse)
|
|
{
|
|
selectedParty = -1;
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
UseItem();
|
|
}
|
|
else
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
subberOption = -1;
|
|
selectedParty = 0;
|
|
}
|
|
}
|
|
else if (subberOption == -1)
|
|
{
|
|
UseItem();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[5]))
|
|
{
|
|
if (subberOption == 0)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
option = 0;
|
|
currentMenu = Menus.Main;
|
|
UpdateMenus();
|
|
}
|
|
else
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
subberOption = 0;
|
|
option = 0;
|
|
selectedParty = -1;
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[0]))
|
|
{
|
|
if (subberOption > 0)
|
|
{
|
|
option -= 2;
|
|
if (option < 0)
|
|
{
|
|
option = 0;
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[1]))
|
|
{
|
|
if (subberOption > 0)
|
|
{
|
|
option += 2;
|
|
if (option >= maxOption)
|
|
{
|
|
option = maxOption - 1;
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[2]))
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
if (subberOption == 0)
|
|
{
|
|
subOption--;
|
|
if (subOption < 0)
|
|
{
|
|
subOption = 2;
|
|
}
|
|
UpdateMenus();
|
|
}
|
|
else if (subberOption == -1)
|
|
{
|
|
selectedParty--;
|
|
if (selectedParty < 0)
|
|
{
|
|
selectedParty = SaveFile.current.activeParty.Count - 1;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (option > 0)
|
|
{
|
|
option--;
|
|
}
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (!Input.IsActionJustPressed(Main.keys[3]))
|
|
{
|
|
break;
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
if (subberOption == 0)
|
|
{
|
|
subOption++;
|
|
if (subOption >= 3)
|
|
{
|
|
subOption = 0;
|
|
}
|
|
UpdateMenus();
|
|
}
|
|
else if (subberOption == -1)
|
|
{
|
|
selectedParty++;
|
|
if (selectedParty >= SaveFile.current.activeParty.Count)
|
|
{
|
|
selectedParty = 0;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (option < maxOption - 1)
|
|
{
|
|
option++;
|
|
}
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
break;
|
|
case Menus.Magic:
|
|
if (subOption == 0)
|
|
{
|
|
soulBody.Position = new Vector2(soulBody.Position.X, -53f);
|
|
soulBody.GlobalPosition = new Vector2(partyHeads[(int)Main.Repeat(option, 3f)].GlobalPosition.X, soulBody.GlobalPosition.Y);
|
|
}
|
|
else
|
|
{
|
|
soulBody.Position = new Vector2(-2f, 2 + 13 * maxOption);
|
|
}
|
|
if (Input.IsActionJustPressed(Main.keys[4]))
|
|
{
|
|
if (subOption == 0)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
maxOption = 0;
|
|
subOption = 1;
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[5]))
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
if (subOption == 0)
|
|
{
|
|
option = 2;
|
|
currentMenu = Menus.Main;
|
|
UpdateMenus();
|
|
}
|
|
else
|
|
{
|
|
subOption = 0;
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[0]))
|
|
{
|
|
if (subOption == 1)
|
|
{
|
|
if (maxOption > 0)
|
|
{
|
|
maxOption--;
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[1]))
|
|
{
|
|
if (subOption == 1)
|
|
{
|
|
if (maxOption < acts.Length - 1)
|
|
{
|
|
maxOption++;
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[2]))
|
|
{
|
|
if (subOption == 0)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
option--;
|
|
if (option < 0)
|
|
{
|
|
option = SaveFile.current.activeParty.Count - 1;
|
|
}
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[3]) && subOption == 0)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
option++;
|
|
if (option >= SaveFile.current.activeParty.Count)
|
|
{
|
|
option = 0;
|
|
}
|
|
UpdateMenus();
|
|
}
|
|
break;
|
|
case Menus.Equip:
|
|
if (subOption == 0)
|
|
{
|
|
soulBody.Position = new Vector2(soulBody.Position.X, -53f);
|
|
soulBody.GlobalPosition = new Vector2(partyHeads[(int)Main.Repeat(option, 3f)].GlobalPosition.X, soulBody.GlobalPosition.Y);
|
|
}
|
|
else if (subOption == 2 && maxOption <= listLow && maxOption >= listLow - 5)
|
|
{
|
|
soulBody.Position = new Vector2(12f, 2 + 13 * (maxOption - listLow + 5));
|
|
}
|
|
if (Input.IsActionJustPressed(Main.keys[5]))
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
if (subOption == 0)
|
|
{
|
|
option = 1;
|
|
currentMenu = Menus.Main;
|
|
scrollBar.current = 0;
|
|
UpdateMenus();
|
|
}
|
|
else if (subOption == 1)
|
|
{
|
|
subberOption = 0;
|
|
subOption = 0;
|
|
UpdateMenus();
|
|
}
|
|
else
|
|
{
|
|
subOption = 1;
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[4]))
|
|
{
|
|
if (subOption == 0)
|
|
{
|
|
subOption = 1;
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
UpdateMenus();
|
|
}
|
|
else if (subOption == 1)
|
|
{
|
|
scrollBar.current = 0;
|
|
if (subberOption == 0 && SaveFile.current.dwWeapon.Count == 0)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[1]);
|
|
break;
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[2]);
|
|
subOption = 2;
|
|
UpdateMenus();
|
|
}
|
|
else if (subberOption == 0 && maxOption >= SaveFile.current.dwWeapon.Count)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[1]);
|
|
}
|
|
else if (EquipItem(subberOption, SaveFile.current.activeParty[option], maxOption, option))
|
|
{
|
|
subOption = 1;
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[0]))
|
|
{
|
|
if (subOption == 1)
|
|
{
|
|
subberOption--;
|
|
maxOption = 0;
|
|
listLow = 5;
|
|
if (subberOption < 0)
|
|
{
|
|
subberOption = 2;
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
UpdateMenus();
|
|
}
|
|
else
|
|
{
|
|
if (subOption != 2)
|
|
{
|
|
break;
|
|
}
|
|
if (maxOption > 0)
|
|
{
|
|
maxOption--;
|
|
if (listLow - 5 > maxOption)
|
|
{
|
|
listLow--;
|
|
}
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
UpdateEquipListCurrent();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[1]))
|
|
{
|
|
if (subOption == 1)
|
|
{
|
|
subberOption++;
|
|
maxOption = 0;
|
|
listLow = 5;
|
|
if (subberOption > 2)
|
|
{
|
|
subberOption = 0;
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
UpdateMenus();
|
|
}
|
|
else
|
|
{
|
|
if (subOption != 2)
|
|
{
|
|
break;
|
|
}
|
|
if (maxOption < 47)
|
|
{
|
|
maxOption++;
|
|
if (listLow < maxOption)
|
|
{
|
|
listLow++;
|
|
}
|
|
}
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
UpdateEquipListCurrent();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[2]))
|
|
{
|
|
if (subOption == 0)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
option--;
|
|
if (option < 0)
|
|
{
|
|
option = SaveFile.current.activeParty.Count - 1;
|
|
}
|
|
UpdateMenus();
|
|
}
|
|
}
|
|
else if (Input.IsActionJustPressed(Main.keys[3]) && subOption == 0)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[0]);
|
|
option++;
|
|
if (option >= SaveFile.current.activeParty.Count)
|
|
{
|
|
option = 0;
|
|
}
|
|
UpdateMenus();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
private bool EquipItem(int slot, int playerID, int item, int playerIndex)
|
|
{
|
|
if (slot == 0)
|
|
{
|
|
Items.IDs ds = SaveFile.current.dwWeapon[item];
|
|
if (Texts.items[ds].partyOnly.HasValue && Texts.items[ds].partyOnly.Value != (Party.IDs)playerID)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[1]);
|
|
ShowDiagBlurb(ds, playerID);
|
|
return false;
|
|
}
|
|
Audio.PlaySound("snd_equip_ch1.wav");
|
|
int num = Party.party[playerID].EQUIP[slot];
|
|
Party.party[playerID].EQUIP[slot] = (int)ds;
|
|
SaveFile.current.dwWeapon.RemoveAt(item);
|
|
if (num != -1)
|
|
{
|
|
SaveFile.current.dwWeapon.Add((Items.IDs)num);
|
|
}
|
|
ShowDiagBlurb(ds, playerID);
|
|
}
|
|
else
|
|
{
|
|
try
|
|
{
|
|
Items.IDs ds = SaveFile.current.dwArmor[item];
|
|
if (Texts.items[ds].partyOnly.HasValue && Texts.items[ds].partyOnly.Value != (Party.IDs)playerID)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[1]);
|
|
ShowDiagBlurb(ds, playerID);
|
|
return false;
|
|
}
|
|
Audio.PlaySound("snd_equip_ch1.wav");
|
|
int num2 = Party.party[playerID].EQUIP[slot];
|
|
Party.party[playerID].EQUIP[slot] = (int)ds;
|
|
SaveFile.current.dwArmor.RemoveAt(item);
|
|
if (num2 != -1)
|
|
{
|
|
SaveFile.current.dwArmor.Add((Items.IDs)num2);
|
|
}
|
|
ShowDiagBlurb(ds, playerID);
|
|
}
|
|
catch
|
|
{
|
|
if (Party.party[playerID].EQUIP[slot] == -1)
|
|
{
|
|
Audio.PlaySound(Audio.commonSounds[1]);
|
|
return false;
|
|
}
|
|
Audio.PlaySound("snd_equip_ch1.wav");
|
|
SaveFile.current.dwArmor.Add((Items.IDs)Party.party[playerID].EQUIP[slot]);
|
|
Party.party[playerID].EQUIP[slot] = -1;
|
|
}
|
|
}
|
|
Party.UpdateStats();
|
|
UpdateEquipList();
|
|
return true;
|
|
}
|
|
|
|
private void ShowDiagBlurb(Items.IDs id, int user)
|
|
{
|
|
string[][] partyDiag = Texts.items[id].partyDiag;
|
|
if (partyDiag != null && partyDiag.Length != 0)
|
|
{
|
|
for (int i = 0; i < SaveFile.current.activeParty.Count; i++)
|
|
{
|
|
partyHUDs[i].diag.Text = Texts.items[id].partyDiag[user][SaveFile.current.activeParty[i]];
|
|
partyHUDs[i].mesTime = 240f;
|
|
}
|
|
}
|
|
}
|
|
|
|
private void UseItem()
|
|
{
|
|
if (selectedParty > -1)
|
|
{
|
|
if (Texts.items[itemList[option]].heal == -2)
|
|
{
|
|
Party.party[SaveFile.current.activeParty[selectedParty]].Heal(Party.party[SaveFile.current.activeParty[selectedParty]].MAXHP / 2);
|
|
BattleDR.ShowFloatingText((Party.party[SaveFile.current.activeParty[selectedParty]].MAXHP / 2).ToString(), partyHUDs[selectedParty].icon.GlobalPosition, Main.colorGreen).ProcessMode = ProcessModeEnum.Always;
|
|
}
|
|
else if (Texts.items[itemList[option]].heal > 0)
|
|
{
|
|
Party.party[SaveFile.current.activeParty[selectedParty]].Heal(Texts.items[itemList[option]].heal);
|
|
BattleDR.ShowFloatingText(Texts.items[itemList[option]].heal.ToString(), partyHUDs[selectedParty].icon.GlobalPosition, Main.colorGreen).ProcessMode = ProcessModeEnum.Always;
|
|
}
|
|
ShowDiagBlurb(itemList[option], SaveFile.current.activeParty[selectedParty]);
|
|
}
|
|
if (Texts.items[itemList[option]].heal >= 50000)
|
|
{
|
|
int amt = Texts.items[itemList[option]].heal - 50000;
|
|
for (int i = 0; i < SaveFile.current.activeParty.Count; i++)
|
|
{
|
|
Party.party[SaveFile.current.activeParty[i]].Heal(amt, i == 0);
|
|
BattleDR.ShowFloatingText(amt.ToString(), partyHUDs[i].icon.GlobalPosition, Main.colorGreen).ProcessMode = ProcessModeEnum.Always;
|
|
}
|
|
ShowDiagBlurb(itemList[option], 0);
|
|
}
|
|
string callEvent = Texts.items[itemList[option]].callEvent;
|
|
if (callEvent != null && callEvent.Length > 1)
|
|
{
|
|
CommonEvents.DoEvent(Texts.items[itemList[option]].callEvent);
|
|
if (!Texts.items[itemList[option]].nonConsumable)
|
|
{
|
|
itemList.RemoveAt(option);
|
|
}
|
|
Exit();
|
|
return;
|
|
}
|
|
if (!Texts.items[itemList[option]].nonConsumable)
|
|
{
|
|
itemList.RemoveAt(option);
|
|
}
|
|
subberOption = 0;
|
|
option = 0;
|
|
selectedParty = -1;
|
|
Party.UpdateHUD();
|
|
UpdateMenus();
|
|
}
|
|
|
|
public void Exit()
|
|
{
|
|
closing = true;
|
|
Player.instance.EndInteraction();
|
|
soulBody.Visible = false;
|
|
mainBox.Visible = false;
|
|
Room.current.CallDeferred("EnableProcess");
|
|
}
|
|
|
|
public void Open()
|
|
{
|
|
currentMenu = Menus.Main;
|
|
option = 0;
|
|
move = 0f;
|
|
maxOption = 5;
|
|
subOption = 0;
|
|
base.Visible = true;
|
|
soulBody.Visible = false;
|
|
closing = false;
|
|
letterBox[0].Visible = true;
|
|
showHP = -100f;
|
|
Room.current.ProcessMode = ProcessModeEnum.Disabled;
|
|
UpdateMenus();
|
|
}
|
|
|
|
private void UpdateEquipList()
|
|
{
|
|
if (subOption != 2)
|
|
{
|
|
if (subberOption == 0)
|
|
{
|
|
for (int i = 0; i < itemListText.Length; i++)
|
|
{
|
|
if (i >= SaveFile.current.dwWeapon.Count)
|
|
{
|
|
itemListText[i] = "[color=gray] - - - - - - - - - - - - -";
|
|
}
|
|
else
|
|
{
|
|
itemListText[i] = Texts.items[SaveFile.current.dwWeapon[i]].name;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
for (int j = 0; j < itemListText.Length; j++)
|
|
{
|
|
if (j >= SaveFile.current.dwArmor.Count)
|
|
{
|
|
itemListText[j] = "[color=gray] - - - - - - - - - - - - -";
|
|
}
|
|
else
|
|
{
|
|
itemListText[j] = Texts.items[SaveFile.current.dwArmor[j]].name;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
UpdateEquipListCurrent();
|
|
}
|
|
|
|
private int[] GetPossibleActs(int id)
|
|
{
|
|
List<int> list = new List<int>();
|
|
if (!Party.party[id].doMagicMenu)
|
|
{
|
|
list.Add(16);
|
|
}
|
|
for (int i = 0; i < Party.party[id].acts.Count; i++)
|
|
{
|
|
bool flag = true;
|
|
List<Items.IDs> needEquip = Texts.skills[Party.party[id].acts[i]].needEquip;
|
|
if (needEquip != null && needEquip.Count > 0 && !Party.party[id].HasEquip(Texts.skills[Party.party[id].acts[i]].needEquip.ToArray()))
|
|
{
|
|
flag = false;
|
|
}
|
|
if (!excludeActs.Contains(Party.party[id].acts[i]) && flag && (Texts.skills[Party.party[id].acts[i]].needFlags == null || SaveFile.HasFlags(Texts.skills[Party.party[id].acts[i]].needFlags)) && (Texts.skills[Party.party[id].acts[i]].neededMembers == null || Party.HasMembers(Texts.skills[Party.party[id].acts[i]].neededMembers)))
|
|
{
|
|
list.Add((int)Party.party[id].acts[i]);
|
|
}
|
|
}
|
|
return list.ToArray();
|
|
}
|
|
|
|
private void UpdateEquipListCurrent()
|
|
{
|
|
RichTextLabel child = equipMenu.GetChild<RichTextLabel>(4);
|
|
UpdateEquipListCurrent(ref listLow, child, ref itemListText);
|
|
UpdateEquipDesc((subberOption == 0) ? Items.Type.Weapon : Items.Type.Equip);
|
|
child.Position = new Vector2(18f, -6f);
|
|
scrollBar.current = maxOption;
|
|
scrollBar.Update();
|
|
GetEquipPreview();
|
|
}
|
|
|
|
private void GetEquipPreview()
|
|
{
|
|
Items.IDs ds = Items.IDs.None;
|
|
if (subOption == 2)
|
|
{
|
|
if (subberOption == 0)
|
|
{
|
|
if (maxOption < SaveFile.current.dwWeapon.Count)
|
|
{
|
|
ds = SaveFile.current.dwWeapon[maxOption];
|
|
}
|
|
}
|
|
else if (maxOption < SaveFile.current.dwArmor.Count)
|
|
{
|
|
ds = SaveFile.current.dwArmor[maxOption];
|
|
}
|
|
if (ds != Items.IDs.None && Texts.items[ds].partyOnly.HasValue && Texts.items[ds].partyOnly != (Party.IDs?)SaveFile.current.activeParty[option])
|
|
{
|
|
ds = Items.IDs.None;
|
|
}
|
|
}
|
|
ShowCharStats(SaveFile.current.activeParty[option], equipMenu.GetChild<RichTextLabel>(3), ds);
|
|
}
|
|
|
|
private void UpdateEquipDesc(Items.Type type)
|
|
{
|
|
switch (type)
|
|
{
|
|
case Items.Type.Weapon:
|
|
if (maxOption < SaveFile.current.dwWeapon.Count)
|
|
{
|
|
itemDesc.Text = Texts.items[SaveFile.current.dwWeapon[maxOption]].descriptionDW;
|
|
}
|
|
else
|
|
{
|
|
itemDesc.Text = "";
|
|
}
|
|
break;
|
|
case Items.Type.Equip:
|
|
if (maxOption < SaveFile.current.dwArmor.Count)
|
|
{
|
|
itemDesc.Text = Texts.items[SaveFile.current.dwArmor[maxOption]].descriptionDW;
|
|
}
|
|
else
|
|
{
|
|
itemDesc.Text = "";
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
public static void UpdateEquipListCurrent(ref int low, RichTextLabel label, ref string[] list, int amt = 6)
|
|
{
|
|
if (list != null)
|
|
{
|
|
string text = "";
|
|
for (int i = low - (amt - 1); i <= low; i++)
|
|
{
|
|
text = text + list[i] + "\n";
|
|
}
|
|
label.Text = text;
|
|
}
|
|
}
|
|
|
|
private void UpdatePartyArrow()
|
|
{
|
|
if (SaveFile.current.activeParty.Count > 3)
|
|
{
|
|
partyArrow[0].Visible = option < 3;
|
|
partyArrow[1].Visible = !partyArrow[0].Visible;
|
|
}
|
|
else
|
|
{
|
|
partyArrow[0].Visible = false;
|
|
partyArrow[1].Visible = false;
|
|
}
|
|
}
|
|
|
|
private void UpdatePartyHead()
|
|
{
|
|
int num = Mathf.FloorToInt((float)option / 3f) * 3;
|
|
int num2 = (int)Main.Repeat(option, 3f);
|
|
for (int i = 0; i < partyHeads.Length; i++)
|
|
{
|
|
partyHeads[i].Visible = i < partyHeads.Length && i < SaveFile.current.activeParty.Count - num;
|
|
if (partyHeads[i].Visible)
|
|
{
|
|
partyHeads[i].Texture = GD.Load<Texture2D>("res://Sprites/Menus/Menu Sprites/" + Party.party[SaveFile.current.activeParty[i + num]].id.ToString() + "Head.tres");
|
|
partyHeads[i].Modulate = ((num2 == i) ? Main.colorWhite : Main.colorDark);
|
|
}
|
|
}
|
|
UpdatePartyArrow();
|
|
}
|
|
|
|
private void UpdateMenus()
|
|
{
|
|
switch (currentMenu)
|
|
{
|
|
case Menus.Main:
|
|
{
|
|
maxOption = 5;
|
|
for (int m = 0; m < maxOption; m++)
|
|
{
|
|
menuButtons[m].SelfModulate = buttonColors[(option == m) ? 1u : 0u];
|
|
}
|
|
menuDesc.Text = Texts.common[13 + option];
|
|
money.Text = "D$ " + SaveFile.current.dollars;
|
|
soulBody.GlobalPosition = menuButtons[option].GlobalPosition + new Vector2(-8f, 0f);
|
|
Party.UpdateHUD();
|
|
equipMenu.Visible = false;
|
|
itemOpt[0].Visible = false;
|
|
buttons.Visible = true;
|
|
itemDesc.Visible = false;
|
|
mainBox.Visible = false;
|
|
listLow = 5;
|
|
scrollBar.current = 0;
|
|
selectedParty = -1;
|
|
subOption = 0;
|
|
subberOption = 0;
|
|
mainText.Text = "";
|
|
break;
|
|
}
|
|
case Menus.Equip:
|
|
{
|
|
mainBox.Visible = true;
|
|
equipMenu.Visible = true;
|
|
equipMenu.Texture = menuBg[0];
|
|
buttons.Visible = subOption == 0;
|
|
itemDesc.Visible = !buttons.Visible;
|
|
scrollBar.Visible = subOption == 2;
|
|
UpdateEquipList();
|
|
if (subOption == 0)
|
|
{
|
|
scrollBar.Update();
|
|
equipMenu.GetChild(0).GetChild<Node2D>(0).Visible = true;
|
|
UpdatePartyHead();
|
|
for (int n = 0; n < 3; n++)
|
|
{
|
|
Sprite2D child2 = equipMenu.GetChild(0).GetChild(0).GetChild<Sprite2D>(n);
|
|
child2.Visible = true;
|
|
if (n == 0)
|
|
{
|
|
child2.Texture = Party.party[SaveFile.current.activeParty[option]].weaponIcon;
|
|
}
|
|
}
|
|
subberOption = 0;
|
|
maxOption = 0;
|
|
listLow = 5;
|
|
equipMenu.GetChild(0).GetChild<Node2D>(1).Visible = false;
|
|
}
|
|
else if (subOption == 1)
|
|
{
|
|
for (int num = 0; num < 3; num++)
|
|
{
|
|
equipMenu.GetChild(0).GetChild(0).GetChild<Node2D>(num)
|
|
.Visible = subberOption != num;
|
|
}
|
|
equipMenu.GetChild(0).GetChild<Node2D>(1).Visible = subberOption > 0;
|
|
soulBody.GlobalPosition = equipMenu.GetChild(0).GetChild(0).GetChild<Node2D>(subberOption)
|
|
.GlobalPosition;
|
|
itemDesc.Text = ((Party.party[SaveFile.current.activeParty[option]].EQUIP[subberOption] != -1) ? Texts.items[(Items.IDs)Party.party[SaveFile.current.activeParty[option]].EQUIP[subberOption]].descriptionDW : "");
|
|
}
|
|
else if (subOption == 2)
|
|
{
|
|
for (int num2 = 0; num2 < 3; num2++)
|
|
{
|
|
equipMenu.GetChild(0).GetChild(0).GetChild<Node2D>(num2)
|
|
.Visible = true;
|
|
}
|
|
}
|
|
equipMenu.GetChild<RichTextLabel>(1).Text = "[center]" + Party.party[SaveFile.current.activeParty[option]].name;
|
|
string text3 = "";
|
|
for (int num3 = 0; num3 < Party.party[SaveFile.current.activeParty[option]].EQUIP.Length; num3++)
|
|
{
|
|
text3 = ((Party.party[SaveFile.current.activeParty[option]].EQUIP[num3] <= -1) ? (text3 + "[color=gray]" + Texts.common[3] + "[/color]") : (text3 + Texts.items[(Items.IDs)Party.party[SaveFile.current.activeParty[option]].EQUIP[num3]].name));
|
|
text3 += "\n";
|
|
}
|
|
equipMenu.GetChild<RichTextLabel>(2).Text = text3;
|
|
GetEquipPreview();
|
|
break;
|
|
}
|
|
case Menus.Magic:
|
|
equipMenu.Texture = menuBg[1];
|
|
equipMenu.Visible = true;
|
|
mainBox.Visible = true;
|
|
buttons.Visible = subOption == 0;
|
|
itemDesc.Visible = !buttons.Visible;
|
|
scrollBar.Visible = false;
|
|
if (subOption == 0)
|
|
{
|
|
equipMenu.GetChild(0).GetChild<Node2D>(0).Visible = false;
|
|
UpdatePartyHead();
|
|
equipMenu.GetChild<RichTextLabel>(1).Text = "[center]" + Party.party[SaveFile.current.activeParty[option]].name;
|
|
equipMenu.GetChild<RichTextLabel>(2).Text = "LV " + Party.party[SaveFile.current.activeParty[option]].LV + " " + Texts.titles[Party.party[SaveFile.current.activeParty[option]].title][0] + "\n" + Texts.titles[Party.party[SaveFile.current.activeParty[option]].title][1];
|
|
acts = GetPossibleActs(SaveFile.current.activeParty[option]);
|
|
string text2 = "[color=gray]";
|
|
for (int l = 0; l < acts.Length; l++)
|
|
{
|
|
text2 = text2 + ((Texts.skills[(Acts.IDs)acts[l]].TP < 10) ? " " : "") + Texts.skills[(Acts.IDs)acts[l]].TP + " % " + Texts.skills[(Acts.IDs)acts[l]].name + "\n";
|
|
}
|
|
RichTextLabel child = equipMenu.GetChild<RichTextLabel>(4);
|
|
child.Text = text2;
|
|
child.Position = new Vector2(4f, -6f);
|
|
ShowCharStats(SaveFile.current.activeParty[option], equipMenu.GetChild<RichTextLabel>(3));
|
|
}
|
|
else if (subOption == 1)
|
|
{
|
|
itemDesc.Text = Texts.skills[(Acts.IDs)acts[maxOption]].menuDesc;
|
|
}
|
|
break;
|
|
case Menus.Items:
|
|
{
|
|
mainBox.Visible = true;
|
|
itemOpt[0].Visible = true;
|
|
itemDesc.Visible = true;
|
|
buttons.Visible = subberOption == 0;
|
|
string text = ((subberOption == 0) ? "\n\n[color=gray]" : "\n\n");
|
|
itemList = ((subOption == 2) ? SaveFile.current.dwKey : SaveFile.current.dwItems);
|
|
for (int i = 0; i < itemList.Count; i++)
|
|
{
|
|
text = ((i % 2 != 0) ? (text + Texts.items[itemList[i]].name + "\n") : (text + " " + Texts.items[itemList[i]].name.PadRight(16, ' ')));
|
|
}
|
|
if (subberOption == 5)
|
|
{
|
|
itemDesc.Text = Texts.common[51].Replace("@", Texts.items[itemList[option]].name).Replace('\\', '\n');
|
|
}
|
|
else if (subberOption == 0)
|
|
{
|
|
itemDesc.Text = "";
|
|
for (int j = 0; j < 3; j++)
|
|
{
|
|
itemOpt[j].Text = Texts.common[25 + j];
|
|
}
|
|
}
|
|
else
|
|
{
|
|
itemDesc.Text = Texts.items[itemList[option]].descriptionDW;
|
|
for (int k = 0; k < 3; k++)
|
|
{
|
|
if (subOption == k)
|
|
{
|
|
itemOpt[k].Text = "[color=orange]";
|
|
}
|
|
else
|
|
{
|
|
itemOpt[k].Text = "[color=gray]";
|
|
}
|
|
itemOpt[k].Text += Texts.common[25 + k];
|
|
}
|
|
}
|
|
maxOption = itemList.Count;
|
|
mainText.Text = text;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
private void ShowCharStats(int charID, RichTextLabel textObj, Items.IDs preview = Items.IDs.None)
|
|
{
|
|
string[] array = new string[3];
|
|
if (preview != Items.IDs.None)
|
|
{
|
|
int[] array2 = new int[3]
|
|
{
|
|
Party.party[charID].ATK,
|
|
Party.party[charID].DEF,
|
|
Party.party[charID].MAGIC
|
|
};
|
|
int[] array3 = Party.StatPreview(charID, preview, subberOption);
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
if (array3[i] == array2[i])
|
|
{
|
|
array[i] = array3[i].ToString();
|
|
}
|
|
else if (array3[i] > array2[i])
|
|
{
|
|
array[i] = "[color=cyan]" + array3[i] + "[/color]";
|
|
}
|
|
else
|
|
{
|
|
array[i] = "[color=red]" + array3[i] + "[/color]";
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
array = new string[3]
|
|
{
|
|
Party.party[charID].ATK.ToString(),
|
|
Party.party[charID].DEF.ToString(),
|
|
Party.party[charID].MAGIC.ToString()
|
|
};
|
|
}
|
|
string text = "[img]res://Sprites/Menus/Menu Sprites/StatAtk.tres[/img] " + Texts.common[9] + array[0] + "\n[img]res://Sprites/Menus/Menu Sprites/StatDef.tres[/img] " + Texts.common[10] + array[1] + "\n[img]res://Sprites/Menus/Menu Sprites/StatMagic.tres[/img] " + Texts.common[11] + array[2] + "\n";
|
|
for (int j = 0; j < 3; text += "\n", j++)
|
|
{
|
|
if (currentMenu == Menus.Magic)
|
|
{
|
|
switch ((Party.IDs)charID)
|
|
{
|
|
case Party.IDs.Clover:
|
|
switch (j)
|
|
{
|
|
case 0:
|
|
if (SaveFile.current.values[7] > 0)
|
|
{
|
|
text = text + Texts.common[5] + (5 + SaveFile.current.values[7]);
|
|
break;
|
|
}
|
|
goto case 1;
|
|
case 1:
|
|
text += "[color=gray]???[/color]";
|
|
break;
|
|
case 2:
|
|
text = text + Texts.common[6] + "[img]res://Sprites/Menus/Menu Sprites/StatGuts.tres[/img]";
|
|
break;
|
|
}
|
|
break;
|
|
case Party.IDs.Kanako:
|
|
switch (j)
|
|
{
|
|
case 0:
|
|
text = text + Texts.common[7] + (70 - SaveFile.current.values[7] + SaveFile.current.values[0]);
|
|
break;
|
|
case 1:
|
|
text = text + Texts.common[8] + "[img]res://Sprites/Menus/Menu Sprites/StatFluff.tres[/img]";
|
|
break;
|
|
case 2:
|
|
text = text + Texts.common[6] + "[img]res://Sprites/Menus/Menu Sprites/StatGuts.tres[/img] ";
|
|
if (SaveFile.HasFlag(SaveFile.Flags.WeirdStart) && SaveFile.HasFlag(SaveFile.Flags.Day1End))
|
|
{
|
|
text += "[img]res://Sprites/Menus/Menu Sprites/StatGuts.tres[/img] ";
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case Party.IDs.Axis:
|
|
switch (j)
|
|
{
|
|
case 0:
|
|
text = text + Texts.common[56] + (SaveFile.HasFlag(SaveFile.Flags.BunBunEvent1) ? "46" : "67");
|
|
break;
|
|
case 2:
|
|
text = text + Texts.common[6] + "[img]res://Sprites/Menus/Menu Sprites/StatGuts.tres[/img] [img]res://Sprites/Menus/Menu Sprites/StatGuts.tres[/img]";
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
continue;
|
|
}
|
|
if (j == subberOption && preview != Items.IDs.None)
|
|
{
|
|
string equipEffect = Texts.items[preview].equipEffect;
|
|
text = ((equipEffect == null || equipEffect.Length <= 0) ? (text + " [color=gray] " + Texts.common[4] + "[/color]") : (text + Texts.items[preview].equipEffect));
|
|
continue;
|
|
}
|
|
if (Party.party[charID].EQUIP[j] > -1)
|
|
{
|
|
string equipEffect2 = Texts.items[(Items.IDs)Party.party[charID].EQUIP[j]].equipEffect;
|
|
if (equipEffect2 != null && equipEffect2.Length > 1)
|
|
{
|
|
text += Texts.items[(Items.IDs)Party.party[charID].EQUIP[j]].equipEffect;
|
|
continue;
|
|
}
|
|
}
|
|
text = text + " [color=gray] " + Texts.common[4] + "[/color]";
|
|
}
|
|
textObj.Text = text;
|
|
}
|
|
|
|
}
|