Add Organized Religion miracle and Temple tiers; update game structure with new markers and visualizations
This commit is contained in:
18
Mods/Miracles/organized_religion.json
Normal file
18
Mods/Miracles/organized_religion.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "Organized Religion",
|
||||
"faithCost": 4000,
|
||||
"followersRequired": 1000,
|
||||
"productionRequired": 500,
|
||||
"unlockedByDefault": false,
|
||||
"effects": [
|
||||
{
|
||||
"type": "ModifyStat",
|
||||
"targetStat": "FaithPerFollower",
|
||||
"op": "Multiply",
|
||||
"value": 1.5
|
||||
},
|
||||
{
|
||||
"type": "DestroySelf"
|
||||
}
|
||||
]
|
||||
}
|
@@ -15,6 +15,7 @@
|
||||
"harness_the_sun",
|
||||
"tame_the_atom",
|
||||
"prosperity_boom",
|
||||
"organized_religion",
|
||||
"unlock_space_age"
|
||||
]
|
||||
},
|
||||
|
22
Mods/Tiers/temple_tiers.json
Normal file
22
Mods/Tiers/temple_tiers.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"tiers": [
|
||||
{
|
||||
"tierEnum": "Tier1",
|
||||
"threshold": 1000,
|
||||
"imagePath": "res://Sprites/Temple.png",
|
||||
"scale": { "x": 0.05, "y": 0.05 }
|
||||
},
|
||||
{
|
||||
"tierEnum": "Tier2",
|
||||
"threshold": 3000,
|
||||
"imagePath": "res://Sprites/Temple.png",
|
||||
"scale": { "x": 0.05, "y": 0.05 }
|
||||
},
|
||||
{
|
||||
"tierEnum": "Tier3",
|
||||
"threshold": 6000,
|
||||
"imagePath": "res://Sprites/Temple.png",
|
||||
"scale": { "x": 0.05, "y": 0.05 }
|
||||
}
|
||||
]
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=21 format=3 uid="uid://bfil8sd154327"]
|
||||
[gd_scene load_steps=22 format=3 uid="uid://bfil8sd154327"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://t71ewkpa5uqs" path="res://Scenes/Main/Main.cs" id="1_p8rbg"]
|
||||
[ext_resource type="Script" uid="uid://b77vh831r1e3c" path="res://Scenes/Main/MiraclePanel.cs" id="2_hcu3t"]
|
||||
@@ -16,6 +16,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://8w7tvsgkev1y" path="res://Scenes/tree.tscn" id="8_hcu3t"]
|
||||
[ext_resource type="Shader" uid="uid://bf8nk145fjkgh" path="res://Shaders/corruption_shader.gdshader" id="9_wgovn"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqkye7yykakns" path="res://Scenes/Followers/FollowerMarker.tscn" id="11_5ci8a"]
|
||||
[ext_resource type="PackedScene" uid="uid://wysxqe44rxhf" path="res://Scenes/TempleMarker.tscn" id="14_udh0u"]
|
||||
[ext_resource type="PackedScene" uid="uid://xk2xirjd1sma" path="res://Scenes/moddable_visual.tscn" id="17_qdkat"]
|
||||
[ext_resource type="Script" uid="uid://furbvcmw31bx" path="res://Scripts/Components/ForestVisualizer.cs" id="18_qdkat"]
|
||||
[ext_resource type="Script" uid="uid://cw8gpeaq3yfjn" path="res://Scripts/Components/RoadManager.cs" id="19_qdkat"]
|
||||
@@ -142,6 +143,7 @@ texture = ExtResource("4_i3fi7")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Hut Markers" type="Node2D" parent="."]
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="HutMarker" parent="Hut Markers" instance=ExtResource("6_cv8e0")]
|
||||
position = Vector2(-1, -29)
|
||||
@@ -206,7 +208,52 @@ position = Vector2(65, 472)
|
||||
[node name="HutMarker21" parent="Hut Markers" instance=ExtResource("6_cv8e0")]
|
||||
position = Vector2(-209, 28)
|
||||
|
||||
[node name="TemplesContainer" type="Node2D" parent="."]
|
||||
|
||||
[node name="HutMarker" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
|
||||
[node name="HutMarker2" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(78, -66)
|
||||
|
||||
[node name="HutMarker3" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(337, -80)
|
||||
|
||||
[node name="HutMarker4" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(357, 67)
|
||||
|
||||
[node name="HutMarker5" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(545, 76)
|
||||
|
||||
[node name="HutMarker6" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(595, -67)
|
||||
|
||||
[node name="HutMarker7" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(572, -243)
|
||||
|
||||
[node name="HutMarker8" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(214, -237)
|
||||
|
||||
[node name="HutMarker9" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(-112, -46)
|
||||
|
||||
[node name="HutMarker11" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(-140, 206)
|
||||
|
||||
[node name="HutMarker12" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(234, 161)
|
||||
|
||||
[node name="HutMarker13" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(187, 425)
|
||||
|
||||
[node name="HutMarker14" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(-48, 338)
|
||||
rotation = -0.0412825
|
||||
|
||||
[node name="HutMarker10" parent="TemplesContainer" instance=ExtResource("14_udh0u")]
|
||||
position = Vector2(-242, 10)
|
||||
|
||||
[node name="Followers Markers" type="Node2D" parent="."]
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="FollowerMarker" parent="Followers Markers" instance=ExtResource("11_5ci8a")]
|
||||
|
||||
@@ -265,6 +312,7 @@ position = Vector2(-88, -32)
|
||||
position = Vector2(82, -234)
|
||||
|
||||
[node name="ForestContainer" type="Node2D" parent="."]
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Tree" parent="ForestContainer" instance=ExtResource("8_hcu3t")]
|
||||
position = Vector2(214, 38)
|
||||
@@ -5566,7 +5614,17 @@ script = ExtResource("18_qdkat")
|
||||
_treesContainer = NodePath("../ForestContainer")
|
||||
metadata/_custom_type_script = "uid://furbvcmw31bx"
|
||||
|
||||
[node name="TemplesVisualizer" type="Node" parent="." node_paths=PackedStringArray("_markersContainer")]
|
||||
script = ExtResource("8_cv8e0")
|
||||
_markersContainer = NodePath("../TemplesContainer")
|
||||
_unitsPerMarker = 1
|
||||
Category = 2
|
||||
_moddableVisualScene = ExtResource("17_qdkat")
|
||||
metadata/_custom_type_script = "uid://dj2wyrq07gfp2"
|
||||
|
||||
[node name="RoadManager" type="Node2D" parent="." node_paths=PackedStringArray("_markersContainer")]
|
||||
position = Vector2(63, -27)
|
||||
script = ExtResource("19_qdkat")
|
||||
_markersContainer = NodePath("../Hut Markers")
|
||||
metadata/_custom_type_script = "uid://cw8gpeaq3yfjn"
|
||||
metadata/_edit_lock_ = true
|
||||
|
14
Scenes/TempleMarker.tscn
Normal file
14
Scenes/TempleMarker.tscn
Normal file
@@ -0,0 +1,14 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://wysxqe44rxhf"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://djaf0gv8s7qib" path="res://Scripts/FollowerMarker.cs" id="1_x8f1l"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcs48aa84w21u" path="res://icon.svg" id="2_tc18m"]
|
||||
|
||||
[node name="HutMarker" type="Marker2D"]
|
||||
script = ExtResource("1_x8f1l")
|
||||
metadata/_custom_type_script = "uid://djaf0gv8s7qib"
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
visible = false
|
||||
modulate = Color(0.406241, 0.161792, 0.609211, 1)
|
||||
scale = Vector2(0.235, 0.235)
|
||||
texture = ExtResource("2_tc18m")
|
@@ -1,6 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
using ParasiticGod.Scripts.Core;
|
||||
using ParasiticGod.Scripts.Singletons;
|
||||
|
||||
@@ -9,7 +8,7 @@ namespace ParasiticGod.Scripts.Components;
|
||||
[GlobalClass]
|
||||
public partial class PopulationVisualizer : Node
|
||||
{
|
||||
public enum VisualCategory { Followers, Huts }
|
||||
public enum VisualCategory { Followers, Huts, Temples }
|
||||
|
||||
[Export] private Node2D _markersContainer;
|
||||
[Export] private int _unitsPerMarker = 5;
|
||||
@@ -32,6 +31,9 @@ public partial class PopulationVisualizer : Node
|
||||
case VisualCategory.Huts:
|
||||
_tiers = GameBus.Instance.HutTiers;
|
||||
break;
|
||||
case VisualCategory.Temples:
|
||||
_tiers = GameBus.Instance.TempleTiers;
|
||||
break;
|
||||
default:
|
||||
GD.PushError($"PopulationVisualizer has an invalid category: {Category}");
|
||||
return;
|
||||
@@ -61,6 +63,7 @@ public partial class PopulationVisualizer : Node
|
||||
{
|
||||
VisualCategory.Followers => (long)newState.Get(Stat.Followers),
|
||||
VisualCategory.Huts => (long)newState.Get(Stat.Followers),
|
||||
VisualCategory.Temples => (long)newState.Get(Stat.Followers),
|
||||
_ => 0
|
||||
};
|
||||
|
||||
|
@@ -13,6 +13,7 @@ public partial class GameBus : Node
|
||||
public Dictionary<string, MiracleDefinition> AllMiracles { get; private set; }
|
||||
public List<TierDefinition> FollowerTiers { get; private set; }
|
||||
public List<TierDefinition> HutTiers { get; private set; }
|
||||
public List<TierDefinition> TempleTiers { get; private set; }
|
||||
|
||||
private PackedScene _gameOverScene = GD.Load<PackedScene>("res://Scenes/game_over.tscn");
|
||||
private PackedScene _winScene = GD.Load<PackedScene>("res://Scenes/win_screen.tscn");
|
||||
@@ -36,6 +37,7 @@ public partial class GameBus : Node
|
||||
AllMiracles = MiracleLoader.LoadAllMiracles();
|
||||
FollowerTiers = TierLoader.LoadTiers("res://Mods/Tiers/follower_tiers.json", "user://Mods/Tiers/follower_tiers.json");
|
||||
HutTiers = TierLoader.LoadTiers("res://Mods/Tiers/hut_tiers.json","user://Mods/Tiers/hut_tiers.json");
|
||||
TempleTiers = TierLoader.LoadTiers("res://Mods/Tiers/temple_tiers.json","user://Mods/Tiers/temple_tiers.json");
|
||||
|
||||
GameWon += OnGameWon;
|
||||
}
|
||||
|
Reference in New Issue
Block a user