public void StorageMoveBetween() { if (PartySwapSelect != -1) { if (sr.battleSetup.PlayerLunenTeam.Count > 1) { GameObject monsterObjectSelected = sr.battleSetup.PlayerLunenTeam[PartySwapSelect]; Monster monsterSelected = monsterObjectSelected.GetComponent <Monster>(); monsterSelected.Heal(monsterSelected.GetMaxHealth()); sr.storageSystem.StoreLunen(monsterSelected); Destroy(monsterObjectSelected); sr.battleSetup.PlayerLunenTeam.RemoveAt(PartySwapSelect); PartyAccess(-1); UpdatePartyPanelLunen(); RefreshStorageButtons(); UICollections[(int)UIState.LunenStorage].SetPanelState("LunenInfoPanel", UITransition.State.Disable); } } else if (StorageLunenIndexSelect != -1) { if (sr.battleSetup.PlayerLunenTeam.Count < 7) { int pageOffset = StorageLunenIndexSelect + (15 * StorageLunenPageSelect); GameData.PlayerLunen pl = sr.storageSystem.StoredLunen[pageOffset]; sr.battleSetup.PlayerLunenTeam.Add(sr.saveSystemObject.GeneratePlayerLunen(pl)); sr.storageSystem.StoredLunen.RemoveAt(pageOffset); RefreshStorageButtons(); SelectStorageLunen(-1); UpdatePartyPanelLunen(); UICollections[(int)UIState.LunenStorage].SetPanelState("LunenInfoPanel", UITransition.State.Disable); } } }
public string GetLunenInfo(Monster monster = null, GameData.PlayerLunen gdMonster = null) { string setValue = ""; if (monster != null) { setValue = "Species: " + monster.SourceLunen.name; setValue += "\nType: " + monster.SourceLunen.Elements[0].name + (monster.SourceLunen.Elements.Count == 2 ? (" / " + monster.SourceLunen.Elements[1].name) : ""); setValue += "\nLevel: " + monster.Level; if (monster.Level >= sr.database.LevelCap) { setValue += "\nEXP: Max Level"; } else { setValue += "\nEXP: " + (monster.Exp.x - monster.Exp.y) + "/" + (monster.Exp.z - monster.Exp.y); } setValue += "\n"; setValue += "\nHealth: " + monster.Health.z + "/" + monster.GetMaxHealth(); setValue += "\nAttack: " + monster.Attack.z; setValue += "\nDefense: " + monster.Defense.z; setValue += "\nSpeed: " + monster.Speed.z; setValue += "\n"; for (int i = 0; i < monster.ActionSet.Count; i++) { setValue += "\nMove " + (i + 1) + ": " + monster.ActionSet[i].Name; } } else if (gdMonster != null) { Lunen thisLunen = sr.database.IndexToLunen(gdMonster.species); setValue = "Species: " + thisLunen.name; setValue += "\nType: " + thisLunen.Elements[0].name + (thisLunen.Elements.Count == 2 ? (" / " + thisLunen.Elements[1].name) : ""); setValue += "\nLevel: " + gdMonster.level; if (gdMonster.level >= sr.database.LevelCap) { setValue += "\nEXP: Max Level"; } else { setValue += "\nEXP: " + gdMonster.exp; } setValue += "\n"; setValue += "\nHealth: " + (gdMonster.currentHealth) + "/" + (gdMonster.currentHealth); setValue += "\nAttack: " + (thisLunen.Attack.x + thisLunen.Attack.y * gdMonster.level); setValue += "\nDefense: " + (thisLunen.Defense.x + thisLunen.Defense.y * gdMonster.level); setValue += "\nSpeed: " + (thisLunen.Speed.x + thisLunen.Speed.y * gdMonster.level); setValue += "\n"; for (int i = 0; i < gdMonster.learnedMoves.Count; i++) { setValue += "\nMove " + (i + 1) + ": " + sr.database.IndexToAction(gdMonster.learnedMoves[i]).Name; } } return(setValue); }
public void SetMonster(Monster _monster = null, GameData.PlayerLunen _pl = null) { monster = _monster; playerLunen = _pl; if (monster != null) { inputField.text = monster.Nickname; } if (playerLunen != null) { inputField.text = playerLunen.nickname; } }
public void SetLunenEntry(GameData.PlayerLunen _entry) { lunenEntry = _entry; if (lunenEntry != null) { button.interactable = true; nameText.text = lunenEntry.nickname; amountText.text = "Lv " + lunenEntry.level; } else { button.interactable = false; nameText.text = ""; amountText.text = ""; } }
public GameObject GeneratePlayerLunen(GameData.PlayerLunen pl) { GameObject newMonsterObject = sr.generateMonster.GenerateLunen( sr.database.IndexToLunen(pl.species), pl.level, GenerateMonster.SortMovesType.None ); Monster newMonster = newMonsterObject.GetComponent <Monster>(); newMonster.Exp.x = pl.exp; newMonster.Health.z = pl.currentHealth; newMonster.Nickname = pl.nickname; for (int j = 0; j < pl.learnedMoves.Count; j++) { newMonster.ActionSet.Add(sr.database.IndexToAction(pl.learnedMoves[j])); } newMonsterObject.transform.parent = this.transform; return(newMonsterObject); }