diff --git a/Assets/Resources/version.txt b/Assets/Resources/version.txt index bcaffe19b..7deb86fee 100644 --- a/Assets/Resources/version.txt +++ b/Assets/Resources/version.txt @@ -1 +1 @@ -0.7.0 \ No newline at end of file +0.7.1 \ No newline at end of file diff --git a/Assets/Scripts/Quest/EventManager.cs b/Assets/Scripts/Quest/EventManager.cs index 81ed552a6..54aff4b8c 100644 --- a/Assets/Scripts/Quest/EventManager.cs +++ b/Assets/Scripts/Quest/EventManager.cs @@ -150,7 +150,7 @@ public void TriggerEvent() Quest.Monster oldMonster = null; foreach (Quest.Monster m in game.quest.monsters) { - if (m.monsterData.name.Equals(qe.cMonster.name)) + if (m.monsterData.sectionName.Equals(qe.cMonster.sectionName)) { // Matched existing monster oldMonster = m; diff --git a/Assets/Scripts/Quest/HeroDialog.cs b/Assets/Scripts/Quest/HeroDialog.cs index 7fe040b06..d1e2ac9d9 100644 --- a/Assets/Scripts/Quest/HeroDialog.cs +++ b/Assets/Scripts/Quest/HeroDialog.cs @@ -28,11 +28,11 @@ public void CreateWindow() // Is this hero defeated? if (hero.defeated) { - new TextButton(new Vector2(HeroCanvas.heroSize + 0.5f, offset + 2.5f), new Vector2(10, 2), "Restored", delegate { restored(); }); + new TextButton(new Vector2(HeroCanvas.heroSize + 0.5f, offset + 2.5f), new Vector2(10, 2), "Recover", delegate { restored(); }); } else { - new TextButton(new Vector2(HeroCanvas.heroSize + 0.5f, offset + 2.5f), new Vector2(10, 2), "Defeated", delegate { defeated(); }); + new TextButton(new Vector2(HeroCanvas.heroSize + 0.5f, offset + 2.5f), new Vector2(10, 2), "KO", delegate { defeated(); }); } new TextButton(new Vector2(HeroCanvas.heroSize + 0.5f, offset + 5f), new Vector2(10, 2), "Cancel", delegate { onCancel(); }); diff --git a/Assets/Scripts/Quest/InfoDialog.cs b/Assets/Scripts/Quest/InfoDialog.cs index 82ce8cd22..4e9d4e8ec 100644 --- a/Assets/Scripts/Quest/InfoDialog.cs +++ b/Assets/Scripts/Quest/InfoDialog.cs @@ -25,7 +25,7 @@ public InfoDialog(Quest.Monster m) db = new DialogBox(new Vector2(12, 13f), new Vector2(UIScaler.GetWidthUnits() - 24, 2), m.uniqueTitle, Color.red); db.textObj.GetComponent().fontSize = UIScaler.GetMediumFont(); db.AddBorder(); - db = new DialogBox(new Vector2(10, 15f), new Vector2(UIScaler.GetWidthUnits() - 20, 8), m.uniqueText.Replace("\\n", "\n")); + db = new DialogBox(new Vector2(10, 15f), new Vector2(UIScaler.GetWidthUnits() - 20, 8), EventManager.SymbolReplace(m.uniqueText.Replace("\\n", "\n"))); db.AddBorder(Color.red); new TextButton(new Vector2(UIScaler.GetWidthUnits() - 21, 23.5f), new Vector2(10, 2), "Close", delegate { onClose(); }); } diff --git a/Assets/Scripts/Quest/Quest.cs b/Assets/Scripts/Quest/Quest.cs index 418b7e929..8e5d5a439 100644 --- a/Assets/Scripts/Quest/Quest.cs +++ b/Assets/Scripts/Quest/Quest.cs @@ -948,6 +948,12 @@ public Monster(EventManager.MonsterEvent monsterEvent) } } + // Create new activation + public void NewActivation(ActivationData contentActivation) + { + currentActivation = new ActivationInstance(contentActivation, monsterData.name.Translate()); + } + // Construct from save data public Monster(Dictionary data) { @@ -989,12 +995,6 @@ public Monster(Dictionary data) } } - // Create new activation - public void NewActivation(ActivationData contentActivation) - { - currentActivation = new ActivationInstance(contentActivation, monsterData.name.Translate()); - } - // Activation instance is requresd to track variables in the activation public class ActivationInstance { diff --git a/Assets/Scripts/Quest/QuestMonster.cs b/Assets/Scripts/Quest/QuestMonster.cs index 55826cd25..aa6d4b505 100644 --- a/Assets/Scripts/Quest/QuestMonster.cs +++ b/Assets/Scripts/Quest/QuestMonster.cs @@ -99,5 +99,6 @@ public QuestActivation(QuestData.Activation qa) : base() masterFirst = qa.masterFirst; move = new StringKey(EventManager.SymbolReplace(qa.move.key), false); moveButton = new StringKey(EventManager.SymbolReplace(qa.moveButton.key), false); + sectionName = qa.sectionName; } } \ No newline at end of file diff --git a/Assets/Scripts/QuestEditor/QuestEditorData.cs b/Assets/Scripts/QuestEditor/QuestEditorData.cs index 397da8f35..e63d8865a 100644 --- a/Assets/Scripts/QuestEditor/QuestEditorData.cs +++ b/Assets/Scripts/QuestEditor/QuestEditorData.cs @@ -573,7 +573,13 @@ public void NewTile() { index++; } - game.quest.qd.components.Add("Tile" + index, new QuestData.Tile("Tile" + index)); + QuestData.Tile tile = new QuestData.Tile("Tile" + index); + game.quest.qd.components.Add("Tile" + index, tile); + + CameraController cc = GameObject.FindObjectOfType(); + tile.location.x = game.gameType.TileRound() * Mathf.Round(cc.gameObject.transform.position.x / game.gameType.TileRound()); + tile.location.y = game.gameType.TileRound() * Mathf.Round(cc.gameObject.transform.position.y / game.gameType.TileRound()); + game.quest.Add("Tile" + index); SelectComponent("Tile" + index); } @@ -587,7 +593,13 @@ public void NewDoor() { index++; } - game.quest.qd.components.Add("Door" + index, new QuestData.Door("Door" + index)); + QuestData.Door door = new QuestData.Door("Door" + index); + game.quest.qd.components.Add("Door" + index, door); + + CameraController cc = GameObject.FindObjectOfType(); + door.location.x = game.gameType.SelectionRound() * Mathf.Round(cc.gameObject.transform.position.x / game.gameType.SelectionRound()); + door.location.y = game.gameType.SelectionRound() * Mathf.Round(cc.gameObject.transform.position.y / game.gameType.SelectionRound()); + game.quest.Add("Door" + index); SelectComponent("Door" + index); } @@ -601,7 +613,13 @@ public void NewToken() { index++; } - game.quest.qd.components.Add("Token" + index, new QuestData.Token("Token" + index)); + QuestData.Token token = new QuestData.Token("Token" + index); + game.quest.qd.components.Add("Token" + index, token); + + CameraController cc = GameObject.FindObjectOfType(); + token.location.x = game.gameType.SelectionRound() * Mathf.Round(cc.gameObject.transform.position.x / game.gameType.SelectionRound()); + token.location.y = game.gameType.SelectionRound() * Mathf.Round(cc.gameObject.transform.position.y / game.gameType.SelectionRound()); + game.quest.Add("Token" + index); SelectComponent("Token" + index); } diff --git a/Assets/Scripts/SaveManager.cs b/Assets/Scripts/SaveManager.cs index 089c63f13..1163e32d4 100644 --- a/Assets/Scripts/SaveManager.cs +++ b/Assets/Scripts/SaveManager.cs @@ -95,8 +95,9 @@ public static void Load() game.stageUI = new NextStageButton(); } } - catch (System.Exception) + catch (System.Exception e) { + e = e; ValkyrieDebug.Log("Error: Unable to open save file: " + SaveFile()); Application.Quit(); }