-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from OpMonTeam/52-add-items-and-items-manager
Add items and items manager
- Loading branch information
Showing
117 changed files
with
4,752 additions
and
2,461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/menuframe.png-2a455113ddbbcdc88cc5b21c62963ae1.stex" | ||
type="CompressedTexture2D" | ||
uid="uid://dokdrfxtwvvk3" | ||
path="res://.godot/imported/menuframe.png-2a455113ddbbcdc88cc5b21c62963ae1.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Data/Backgrounds/menuframe.png" | ||
dest_files=[ "res://.import/menuframe.png-2a455113ddbbcdc88cc5b21c62963ae1.stex" ] | ||
dest_files=["res://.godot/imported/menuframe.png-2a455113ddbbcdc88cc5b21c62963ae1.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
flags/repeat=0 | ||
flags/filter=false | ||
flags/mipmaps=false | ||
flags/anisotropic=false | ||
flags/srgb=2 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
process/normal_map_invert_y=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://cpw3rvof6qohv"] | ||
|
||
[ext_resource type="FontFile" uid="uid://c5pnk4yop31d" path="res://Data/Fonts/main_font.ttf" id="1_o5cdq"] | ||
|
||
[resource] | ||
default_font = ExtResource("1_o5cdq") | ||
default_font_size = 24 | ||
Label/colors/font_color = Color(0, 0, 0, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[remap] | ||
|
||
importer="font_data_dynamic" | ||
type="FontFile" | ||
uid="uid://c5pnk4yop31d" | ||
path="res://.godot/imported/main_font.ttf-7a660bcaa92579991570761e927f7515.fontdata" | ||
|
||
[deps] | ||
|
||
source_file="res://Data/Fonts/main_font.ttf" | ||
dest_files=["res://.godot/imported/main_font.ttf-7a660bcaa92579991570761e927f7515.fontdata"] | ||
|
||
[params] | ||
|
||
Rendering=null | ||
antialiasing=1 | ||
generate_mipmaps=false | ||
multichannel_signed_distance_field=false | ||
msdf_pixel_range=8 | ||
msdf_size=48 | ||
force_autohinter=false | ||
hinting=1 | ||
subpixel_positioning=1 | ||
oversampling=0.0 | ||
Fallbacks=null | ||
fallbacks=[] | ||
Compress=null | ||
compress=true | ||
preload=[] | ||
language_support={} | ||
script_support={} | ||
opentype_features={} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
extends ItemEffect | ||
|
||
class_name Heal | ||
|
||
@export var hp: int | ||
|
||
func _init(p_hp := 0): | ||
hp = p_hp | ||
|
||
func apply_opmon_battle(battle_scene: BattleScene, user: OpMon, opponent: OpMon) -> bool: | ||
user.hp += hp | ||
battle_scene.heal(user, hp) | ||
return true | ||
|
||
func apply_opmon_overworld(map_manager: MapManager, user: OpMon) -> bool: | ||
user.hp += hp | ||
# TODO add dialog here, standardize a way to start a dialog from MapManager so the | ||
# items and events can start a dialog the same way and easily | ||
return true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
extends ItemEffect | ||
|
||
class_name StatPlus | ||
|
||
const Stats = preload("res://Objects/Enumerations.gd").Stats | ||
|
||
@export var stat: Stats | ||
@export var change: int | ||
var cse: ChangeStatEffect # Emulates the effect of a move of this type | ||
|
||
func _init(p_stat := Stats.NOTHING, p_change := 0): | ||
stat = p_stat | ||
change = p_change | ||
cse = ChangeStatEffect.new(stat, change, false) | ||
|
||
func apply_opmon_battle(battle_scene: BattleScene, user: OpMon, opponent: OpMon) -> bool: | ||
return cse.apply(battle_scene, null, user, opponent) # Always return true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://7736d5mmqn1a"] | ||
|
||
[ext_resource type="Script" path="res://Data/GodotResources/Items/ItemEffects/Heal.gd" id="1_1frsn"] | ||
[ext_resource type="Script" path="res://Objects/Item.gd" id="1_nnbf0"] | ||
|
||
[sub_resource type="Resource" id="Resource_rnov4"] | ||
script = ExtResource("1_1frsn") | ||
hp = 20 | ||
|
||
[resource] | ||
script = ExtResource("1_nnbf0") | ||
id = "POTION" | ||
applies_to_opmon = true | ||
consumes = true | ||
effect_used = Array[Resource("res://Objects/ItemEffect.gd")]([SubResource("Resource_rnov4")]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://clot0dqmu38wj"] | ||
|
||
[ext_resource type="Script" path="res://Data/GodotResources/Items/ItemEffects/StatPlus.gd" id="1_66cpn"] | ||
[ext_resource type="Script" path="res://Objects/Item.gd" id="2_d4kru"] | ||
|
||
[sub_resource type="Resource" id="Resource_rl00e"] | ||
script = ExtResource("1_66cpn") | ||
stat = 0 | ||
change = 1 | ||
|
||
[resource] | ||
script = ExtResource("2_d4kru") | ||
id = "XATTACK" | ||
applies_to_opmon = true | ||
consumes = true | ||
effect_used = Array[Resource("res://Objects/ItemEffect.gd")]([SubResource("Resource_rl00e")]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
extends Resource | ||
extends MoveEffect | ||
|
||
class_name ChangeStatEffect | ||
|
||
const Stats = preload("res://Objects/Enumerations.gd").Stats | ||
|
||
export(Stats) var stat | ||
export(int) var change | ||
export(bool) var to_opponent | ||
@export var stat: Stats | ||
@export var change: int | ||
@export var to_opponent: bool | ||
|
||
func _init(p_stat = Stats.ATK, p_change = 0, p_to_opponent = false): | ||
stat = p_stat | ||
change = p_change | ||
to_opponent = p_to_opponent | ||
|
||
func apply(battle_scene, _move, user: OpMon, opponent: OpMon) -> bool: | ||
func apply(battle_scene: BattleScene, _move, user: OpMon, opponent: OpMon) -> bool: | ||
var target = opponent if to_opponent else user | ||
battle_scene.stat_changed(target, stat, target.change_stat(stat, change)) | ||
return true | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
[gd_resource type="Resource" load_steps=2 format=2] | ||
|
||
[ext_resource path="res://Objects/Move.gd" type="Script" id=1] | ||
|
||
[resource] | ||
script = ExtResource( 1 ) | ||
name = "MOVENAME_EMBER" | ||
power = 40 | ||
type = 6 | ||
accuracy = 100 | ||
category = 1 | ||
never_fails = false | ||
max_power_points = 25 | ||
priority = 0 | ||
pre_effect = [ ] | ||
post_effect = [ ] | ||
fail_effect = [ ] | ||
move_animation = "PULSING_SCOOT" | ||
[gd_resource type="Resource" script_class="Move" load_steps=2 format=3 uid="uid://dyh5momr2rbdx"] | ||
|
||
[ext_resource type="Script" path="res://Objects/Move.gd" id="1"] | ||
|
||
[resource] | ||
script = ExtResource("1") | ||
id = "EMBER" | ||
power = 40 | ||
type = 6 | ||
accuracy = 100 | ||
category = 1 | ||
never_fails = false | ||
max_power_points = 25 | ||
priority = 0 | ||
pre_effect = Array[Resource("res://Objects/MoveEffect.gd")]([]) | ||
post_effect = Array[Resource("res://Objects/MoveEffect.gd")]([]) | ||
fail_effect = Array[Resource("res://Objects/MoveEffect.gd")]([]) | ||
move_animation = "PULSING_SCOOT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
[gd_resource type="Resource" load_steps=4 format=2] | ||
|
||
[ext_resource path="res://Objects/Move.gd" type="Script" id=1] | ||
[ext_resource path="res://Data/GodotResources/Moves/Effects/ChangeStatEffect.gd" type="Script" id=2] | ||
|
||
[sub_resource type="Resource" id=1] | ||
script = ExtResource( 2 ) | ||
stat = 0 | ||
change = -1 | ||
to_opponent = true | ||
|
||
[resource] | ||
script = ExtResource( 1 ) | ||
name = "MOVENAME_GROWL" | ||
power = 0 | ||
type = 9 | ||
accuracy = 100 | ||
category = 2 | ||
never_fails = false | ||
max_power_points = 40 | ||
priority = 0 | ||
pre_effect = [ SubResource( 1 ) ] | ||
post_effect = [ ] | ||
fail_effect = [ ] | ||
move_animation = "SWAY" | ||
[gd_resource type="Resource" script_class="Move" load_steps=4 format=3 uid="uid://b1pq2suvej5ne"] | ||
|
||
[ext_resource type="Script" path="res://Objects/Move.gd" id="1"] | ||
[ext_resource type="Script" path="res://Data/GodotResources/Moves/Effects/ChangeStatEffect.gd" id="2"] | ||
|
||
[sub_resource type="Resource" id="1"] | ||
script = ExtResource("2") | ||
stat = 0 | ||
change = -1 | ||
to_opponent = true | ||
|
||
[resource] | ||
script = ExtResource("1") | ||
id = "GROWL" | ||
power = 0 | ||
type = 9 | ||
accuracy = 100 | ||
category = 2 | ||
never_fails = false | ||
max_power_points = 40 | ||
priority = 0 | ||
pre_effect = Array[Resource("res://Objects/MoveEffect.gd")]([SubResource("1")]) | ||
post_effect = Array[Resource("res://Objects/MoveEffect.gd")]([]) | ||
fail_effect = Array[Resource("res://Objects/MoveEffect.gd")]([]) | ||
move_animation = "SWAY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
[gd_resource type="Resource" load_steps=4 format=2] | ||
|
||
[ext_resource path="res://Objects/Move.gd" type="Script" id=1] | ||
[ext_resource path="res://Data/GodotResources/Moves/Effects/ChangeStatEffect.gd" type="Script" id=2] | ||
|
||
[sub_resource type="Resource" id=1] | ||
script = ExtResource( 2 ) | ||
stat = 1 | ||
change = 1 | ||
to_opponent = false | ||
|
||
[resource] | ||
script = ExtResource( 1 ) | ||
name = "MOVENAME_HARDEN" | ||
power = 0 | ||
type = 9 | ||
accuracy = 100 | ||
category = 2 | ||
never_fails = true | ||
max_power_points = 30 | ||
priority = 0 | ||
pre_effect = [ SubResource( 1 ) ] | ||
post_effect = [ ] | ||
fail_effect = [ ] | ||
move_animation = "SLOW_DOUBLE_DIP" | ||
[gd_resource type="Resource" script_class="Move" load_steps=4 format=3 uid="uid://bwoprvu1xlnam"] | ||
|
||
[ext_resource type="Script" path="res://Objects/Move.gd" id="1"] | ||
[ext_resource type="Script" path="res://Data/GodotResources/Moves/Effects/ChangeStatEffect.gd" id="2"] | ||
|
||
[sub_resource type="Resource" id="1"] | ||
script = ExtResource("2") | ||
stat = 1 | ||
change = 1 | ||
to_opponent = false | ||
|
||
[resource] | ||
script = ExtResource("1") | ||
id = "HARDEN" | ||
power = 0 | ||
type = 9 | ||
accuracy = 100 | ||
category = 2 | ||
never_fails = true | ||
max_power_points = 30 | ||
priority = 0 | ||
pre_effect = Array[Resource("res://Objects/MoveEffect.gd")]([SubResource("1")]) | ||
post_effect = Array[Resource("res://Objects/MoveEffect.gd")]([]) | ||
fail_effect = Array[Resource("res://Objects/MoveEffect.gd")]([]) | ||
move_animation = "SLOW_DOUBLE_DIP" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
[gd_resource type="Resource" load_steps=2 format=2] | ||
[gd_resource type="Resource" script_class="Move" load_steps=2 format=3 uid="uid://c7umqbgwt6cmk"] | ||
|
||
[ext_resource path="res://Objects/Move.gd" type="Script" id=1] | ||
[ext_resource type="Script" path="res://Objects/Move.gd" id="1"] | ||
|
||
[resource] | ||
script = ExtResource( 1 ) | ||
name = "MOVENAME_TACKLE" | ||
script = ExtResource("1") | ||
id = "TACKLE" | ||
power = 40 | ||
type = 9 | ||
accuracy = 100 | ||
category = 0 | ||
never_fails = false | ||
max_power_points = 40 | ||
priority = 0 | ||
pre_effect = [ ] | ||
post_effect = [ ] | ||
fail_effect = [ ] | ||
pre_effect = Array[Resource("res://Objects/MoveEffect.gd")]([]) | ||
post_effect = Array[Resource("res://Objects/MoveEffect.gd")]([]) | ||
fail_effect = Array[Resource("res://Objects/MoveEffect.gd")]([]) | ||
move_animation = "SCOOT" |
Oops, something went wrong.