From 3a8aae7af016130d7a153e8c4242f1ad846d36a1 Mon Sep 17 00:00:00 2001 From: jjayers99 <56438137+jjayers99@users.noreply.github.com> Date: Wed, 12 Apr 2023 23:25:39 -0400 Subject: [PATCH] Adventure updates --- .../adventure/character/DialogActor.java | 19 ++++++++++++--- .../maps/map/main_story/forest_capital.tmx | 20 ++++++++-------- .../maps/map/main_story/island_capital.tmx | 20 ++++++++-------- .../maps/map/main_story/mountain_capital.tmx | 20 ++++++++-------- .../maps/map/main_story/plains_capital.tmx | 21 ++++++++-------- .../maps/map/main_story/swamp_capital.tmx | 21 ++++++++-------- .../Shandalar/world/points_of_interest.json | 24 +++++-------------- 7 files changed, 74 insertions(+), 71 deletions(-) diff --git a/forge-gui-mobile/src/forge/adventure/character/DialogActor.java b/forge-gui-mobile/src/forge/adventure/character/DialogActor.java index 1254b619f12..fe0dae6feee 100644 --- a/forge-gui-mobile/src/forge/adventure/character/DialogActor.java +++ b/forge-gui-mobile/src/forge/adventure/character/DialogActor.java @@ -5,6 +5,7 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import forge.adventure.data.AdventureQuestData; +import forge.adventure.data.DialogData; import forge.adventure.stage.MapStage; import forge.adventure.util.Current; import forge.adventure.util.MapDialog; @@ -44,17 +45,29 @@ public class DialogActor extends CharacterSprite { } }; dialog.addQuestAcceptedListener(listen); + + ChangeListener finished = new ChangeListener() { + @Override + public void changed(ChangeEvent changeEvent, Actor actor) { + removeFromMap(); + } + }; + dialog.addDialogCompleteListener(finished); } public void acceptQuest(){ Current.player().addQuest(questData); } + public void removeFromMap() { dialog = null; } + @Override public void onPlayerCollide() { - stage.resetPosition(); - stage.showDialog(); - dialog.activate(); + if (dialog != null) { + stage.resetPosition(); + stage.showDialog(); + dialog.activate(); + } } @Override diff --git a/forge-gui/res/adventure/Shandalar/maps/map/main_story/forest_capital.tmx b/forge-gui/res/adventure/Shandalar/maps/map/main_story/forest_capital.tmx index 61e233104ff..a32b9db7a50 100644 --- a/forge-gui/res/adventure/Shandalar/maps/map/main_story/forest_capital.tmx +++ b/forge-gui/res/adventure/Shandalar/maps/map/main_story/forest_capital.tmx @@ -178,16 +178,6 @@ "rounds":3, "entryFee":100, "rewards": [[ - { - "type": "card", - "probability": 1, - "count":2, - "rarity": [ - "Mythic Rare" - ], - "colors": ["green"] - } - ],[ { "type": "gold", "probability": 1, @@ -199,6 +189,16 @@ "count": 1, "itemNames": ["Dungeon Map","Mad Staff","Gold Boots","Disrupting Scepter"] } + ],[ + { + "type": "card", + "probability": 1, + "count":2, + "rarity": [ + "Rare","Mythic Rare" + ], + "colors": ["green"] + } ] ] } diff --git a/forge-gui/res/adventure/Shandalar/maps/map/main_story/island_capital.tmx b/forge-gui/res/adventure/Shandalar/maps/map/main_story/island_capital.tmx index d2305cd13b4..a325b7b2756 100644 --- a/forge-gui/res/adventure/Shandalar/maps/map/main_story/island_capital.tmx +++ b/forge-gui/res/adventure/Shandalar/maps/map/main_story/island_capital.tmx @@ -154,16 +154,6 @@ "rounds":3, "entryFee":100, "rewards": [[ - { - "type": "card", - "probability": 1, - "count":2, - "rarity": [ - "Mythic Rare" - ], - "colors": ["blue"] - } - ],[ { "type": "gold", "probability": 1, @@ -175,6 +165,16 @@ "count": 1, "itemNames": ["Mithril Armor","Mithril Shield","Mithril Boots","Dagger"] } + ],[ + { + "type": "card", + "probability": 1, + "count":2, + "rarity": [ + "Rare","Mythic Rare" + ], + "colors": ["blue"] + } ] ] } diff --git a/forge-gui/res/adventure/Shandalar/maps/map/main_story/mountain_capital.tmx b/forge-gui/res/adventure/Shandalar/maps/map/main_story/mountain_capital.tmx index 8874d15a4a1..939f3fd222f 100644 --- a/forge-gui/res/adventure/Shandalar/maps/map/main_story/mountain_capital.tmx +++ b/forge-gui/res/adventure/Shandalar/maps/map/main_story/mountain_capital.tmx @@ -160,16 +160,6 @@ "rounds":3, "entryFee":100, "rewards": [[ - { - "type": "card", - "probability": 1, - "count":2, - "rarity": [ - "Mythic Rare" - ], - "colors": ["red"] - } - ],[ { "type": "gold", "probability": 1, @@ -181,6 +171,16 @@ "count": 1, "itemNames": ["Aladdin's Ring","Axt","Ring of Immortals","Jandor's Ring"] } + ],[ + { + "type": "card", + "probability": 1, + "count":2, + "rarity": [ + "Rare","Mythic Rare" + ], + "colors": ["red"] + } ] ] } diff --git a/forge-gui/res/adventure/Shandalar/maps/map/main_story/plains_capital.tmx b/forge-gui/res/adventure/Shandalar/maps/map/main_story/plains_capital.tmx index dcf6c657a33..09cc96033b8 100644 --- a/forge-gui/res/adventure/Shandalar/maps/map/main_story/plains_capital.tmx +++ b/forge-gui/res/adventure/Shandalar/maps/map/main_story/plains_capital.tmx @@ -153,16 +153,6 @@ "rounds":3, "entryFee":100, "rewards": [[ - { - "type": "card", - "probability": 1, - "count":2, - "rarity": [ - "Mythic Rare" - ], - "colors": ["white"] - } - ],[ { "type": "gold", "probability": 1, @@ -175,6 +165,17 @@ "count": 1, "itemNames": ["Gold Armor","Gold Shield","Gold Boots","Bronze Sword"] } + ], +[ + { + "type": "card", + "probability": 1, + "count":2, + "rarity": [ + "Rare","Mythic Rare" + ], + "colors": ["white"] + } ] ] } diff --git a/forge-gui/res/adventure/Shandalar/maps/map/main_story/swamp_capital.tmx b/forge-gui/res/adventure/Shandalar/maps/map/main_story/swamp_capital.tmx index 189e522e957..19ba32e670d 100644 --- a/forge-gui/res/adventure/Shandalar/maps/map/main_story/swamp_capital.tmx +++ b/forge-gui/res/adventure/Shandalar/maps/map/main_story/swamp_capital.tmx @@ -82,16 +82,6 @@ "rounds":3, "entryFee":100, "rewards": [[ - { - "type": "card", - "probability": 1, - "count":2, - "rarity": [ - "Mythic Rare" - ], - "colors": ["black"] - } - ],[ { "type": "gold", "probability": 1, @@ -103,6 +93,17 @@ "count": 1, "itemNames": ["Death Ring","Dark Armor","Dark Shield","Dark Boots"] } + ], + [ + { + "type": "card", + "probability": 1, + "count":2, + "rarity": [ + "Rare","Mythic Rare" + ], + "colors": ["black"] + } ] ] } diff --git a/forge-gui/res/adventure/Shandalar/world/points_of_interest.json b/forge-gui/res/adventure/Shandalar/world/points_of_interest.json index ae8c0e16cd1..4c813c6d36f 100644 --- a/forge-gui/res/adventure/Shandalar/world/points_of_interest.json +++ b/forge-gui/res/adventure/Shandalar/world/points_of_interest.json @@ -261,9 +261,7 @@ "radiusFactor": 0.8, "questTags": [ "Cave", - "Hostile", - "BiomeBlack", - "Sidequest" + "BiomeBlack" ] }, { @@ -395,10 +393,8 @@ "map": "maps/map/cave_2.tmx", "radiusFactor": 0.8, "questTags": [ - "Hostile", "Cave", - "BiomeColorless", - "Sidequest" + "BiomeColorless" ] }, { @@ -591,9 +587,7 @@ "radiusFactor": 0.8, "questTags": [ "Cave", - "Hostile", - "BiomeGreen", - "Sidequest" + "BiomeGreen" ] }, { @@ -710,10 +704,8 @@ "map": "maps/map/cave_2.tmx", "radiusFactor": 0.8, "questTags": [ - "Hostile", "Cave", - "BiomeBlue", - "Sidequest" + "BiomeBlue" ] }, { @@ -800,10 +792,8 @@ "map": "maps/map/cave_2.tmx", "radiusFactor": 0.8, "questTags": [ - "Hostile", "Cave", - "BiomeRed", - "Sidequest" + "BiomeRed" ] }, { @@ -1040,10 +1030,8 @@ "map": "maps/map/cave_2.tmx", "radiusFactor": 0.8, "questTags": [ - "Hostile", "Cave", - "BiomeWhite", - "Sidequest" + "BiomeWhite" ] }, {