Add stars when units are spawned with higher ranks
This commit is contained in:
		
							parent
							
								
									dfb5ecd2db
								
							
						
					
					
						commit
						b154bed9bf
					
				
							
								
								
									
										1
									
								
								TODO.md
								
								
								
								
							
							
						
						
									
										1
									
								
								TODO.md
								
								
								
								
							| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
1. Visual polish
 | 
			
		||||
  * visual indication when a unit is stronger (eg. a little skull or star or something)
 | 
			
		||||
  * multiple square tiles to add variation
 | 
			
		||||
2. Sound effects
 | 
			
		||||
  * when a unit is killed
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -428,6 +428,10 @@ func _on_new_turn():
 | 
			
		|||
					new_piece(square['reinforcement'], "opponent", coord)
 | 
			
		||||
					square = self.board_squares[coord]
 | 
			
		||||
					if self.reinforcement_buff != null:
 | 
			
		||||
						var rank_string = ""
 | 
			
		||||
						for i in range(self.reinforcement_buff):
 | 
			
		||||
							rank_string += "*"
 | 
			
		||||
						square['piece'].get_node("Rank").set_text(rank_string)
 | 
			
		||||
						square['piece'].speed += self.reinforcement_buff
 | 
			
		||||
						square['piece'].damage += self.reinforcement_buff
 | 
			
		||||
						square['piece'].health += self.reinforcement_buff
 | 
			
		||||
| 
						 | 
				
			
			@ -786,6 +790,10 @@ func apply_powerup_to_piece(square):
 | 
			
		|||
				new_piece(square['reinforcement'], group, c)
 | 
			
		||||
				square = self.board_squares[c]
 | 
			
		||||
				if self.reinforcement_buff != null:
 | 
			
		||||
					var rank_string = ""
 | 
			
		||||
					for i in range(self.reinforcement_buff):
 | 
			
		||||
						rank_string += "* "
 | 
			
		||||
					square['piece'].get_node("Rank").set_text(rank_string)
 | 
			
		||||
					square['piece'].damage += self.reinforcement_buff
 | 
			
		||||
					square['piece'].speed += self.reinforcement_buff
 | 
			
		||||
					square['piece'].health += self.reinforcement_buff
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -85,15 +85,16 @@ custom_fonts/font = ExtResource( 1 )
 | 
			
		|||
text = "1	"
 | 
			
		||||
 | 
			
		||||
[node name="UpHealth" type="Button" parent="Vbox"]
 | 
			
		||||
visible = false
 | 
			
		||||
margin_top = 219.0
 | 
			
		||||
margin_right = 190.0
 | 
			
		||||
margin_bottom = 239.0
 | 
			
		||||
text = "Increase health"
 | 
			
		||||
 | 
			
		||||
[node name="Damage" type="HBoxContainer" parent="Vbox"]
 | 
			
		||||
margin_top = 243.0
 | 
			
		||||
margin_top = 219.0
 | 
			
		||||
margin_right = 190.0
 | 
			
		||||
margin_bottom = 307.0
 | 
			
		||||
margin_bottom = 283.0
 | 
			
		||||
 | 
			
		||||
[node name="TextureRect" type="TextureRect" parent="Vbox/Damage"]
 | 
			
		||||
material = ExtResource( 3 )
 | 
			
		||||
| 
						 | 
				
			
			@ -117,9 +118,9 @@ margin_bottom = 307.0
 | 
			
		|||
text = "Increase damage"
 | 
			
		||||
 | 
			
		||||
[node name="Kills" type="HBoxContainer" parent="Vbox"]
 | 
			
		||||
margin_top = 311.0
 | 
			
		||||
margin_top = 287.0
 | 
			
		||||
margin_right = 190.0
 | 
			
		||||
margin_bottom = 375.0
 | 
			
		||||
margin_bottom = 351.0
 | 
			
		||||
 | 
			
		||||
[node name="TextureRect" type="TextureRect" parent="Vbox/Kills"]
 | 
			
		||||
material = ExtResource( 3 )
 | 
			
		||||
| 
						 | 
				
			
			@ -136,16 +137,17 @@ custom_fonts/font = ExtResource( 1 )
 | 
			
		|||
text = "1"
 | 
			
		||||
 | 
			
		||||
[node name="Jump" type="Label" parent="Vbox"]
 | 
			
		||||
margin_top = 379.0
 | 
			
		||||
margin_top = 355.0
 | 
			
		||||
margin_right = 190.0
 | 
			
		||||
margin_bottom = 403.0
 | 
			
		||||
margin_bottom = 379.0
 | 
			
		||||
custom_fonts/font = SubResource( 1 )
 | 
			
		||||
text = "Cannot jump"
 | 
			
		||||
 | 
			
		||||
[node name="CheckButton" type="CheckButton" parent="Vbox"]
 | 
			
		||||
margin_top = 407.0
 | 
			
		||||
visible = false
 | 
			
		||||
margin_top = 383.0
 | 
			
		||||
margin_right = 190.0
 | 
			
		||||
margin_bottom = 447.0
 | 
			
		||||
margin_bottom = 423.0
 | 
			
		||||
text = "Jump"
 | 
			
		||||
 | 
			
		||||
[node name="Powerup" type="Button" parent="Vbox"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,3 +15,7 @@ margin_left = 0.902771
 | 
			
		|||
margin_top = -73.0833
 | 
			
		||||
margin_right = 81.9028
 | 
			
		||||
margin_bottom = -0.0833435
 | 
			
		||||
 | 
			
		||||
[node name="Rank" parent="." index="3"]
 | 
			
		||||
margin_left = -60.0
 | 
			
		||||
margin_right = 59.0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,8 +1,9 @@
 | 
			
		|||
[gd_scene load_steps=6 format=2]
 | 
			
		||||
[gd_scene load_steps=8 format=2]
 | 
			
		||||
 | 
			
		||||
[ext_resource path="res://src/Piece.gd" type="Script" id=1]
 | 
			
		||||
[ext_resource path="res://src/hilight.shader" type="Shader" id=2]
 | 
			
		||||
[ext_resource path="res://src/font_32.tres" type="DynamicFont" id=3]
 | 
			
		||||
[ext_resource path="res://assets/source/Bitstream Vera Sans Mono Bold Nerd Font Complete.ttf" type="DynamicFontData" id=4]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ShaderMaterial" id=1]
 | 
			
		||||
shader = ExtResource( 2 )
 | 
			
		||||
| 
						 | 
				
			
			@ -12,6 +13,12 @@ shader_param/color = null
 | 
			
		|||
[sub_resource type="RectangleShape2D" id=2]
 | 
			
		||||
extents = Vector2( 64, 64 )
 | 
			
		||||
 | 
			
		||||
[sub_resource type="DynamicFont" id=3]
 | 
			
		||||
size = 20
 | 
			
		||||
outline_size = 1
 | 
			
		||||
outline_color = Color( 0, 0, 0, 1 )
 | 
			
		||||
font_data = ExtResource( 4 )
 | 
			
		||||
 | 
			
		||||
[node name="Piece" type="Area2D"]
 | 
			
		||||
script = ExtResource( 1 )
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -22,6 +29,7 @@ material = SubResource( 1 )
 | 
			
		|||
shape = SubResource( 2 )
 | 
			
		||||
 | 
			
		||||
[node name="StatusChange" type="Label" parent="."]
 | 
			
		||||
visible = false
 | 
			
		||||
margin_left = 45.0
 | 
			
		||||
margin_top = -126.0
 | 
			
		||||
margin_right = 126.0
 | 
			
		||||
| 
						 | 
				
			
			@ -32,4 +40,16 @@ valign = 1
 | 
			
		|||
__meta__ = {
 | 
			
		||||
"_edit_use_anchors_": false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
[node name="Rank" type="Label" parent="."]
 | 
			
		||||
modulate = Color( 1, 0.945098, 0, 0.698039 )
 | 
			
		||||
margin_left = -61.0
 | 
			
		||||
margin_top = -60.0
 | 
			
		||||
margin_right = 61.0
 | 
			
		||||
margin_bottom = -9.0
 | 
			
		||||
custom_fonts/font = SubResource( 3 )
 | 
			
		||||
autowrap = true
 | 
			
		||||
__meta__ = {
 | 
			
		||||
"_edit_use_anchors_": false
 | 
			
		||||
}
 | 
			
		||||
[connection signal="input_event" from="." to="." method="_on_Piece_input_event"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue