-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added monster drops Monsters can now be configured to drop items based on a resource (MonsterDrops.gd). The usability is not the greatest, but that's due to not being able to export custom types. There were two possible approaches that I saw: 1. An `Array` holding dictionaries for each item that can be dropped along with the data needed for the drop behavior. 2. Create a custom resource that would encapsulate all the data for the items that can be dropped from a monster: The item itself, min and max quantities, and the chance. I decided to go with the first one. ps: The items are _NOT_ being added to the player's inventory . This is just the functionality needed for the monsters to start dropping items. Closes #59 * Embedded drops array to battler template, fixed code issues
- Loading branch information
1 parent
225bb33
commit 882333b
Showing
7 changed files
with
57 additions
and
17 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
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 was deleted.
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,20 @@ | ||
[gd_resource type="Resource" load_steps=5 format=2] | ||
|
||
[ext_resource path="res://animation/PorcupineAnim.tscn" type="PackedScene" id=1] | ||
[ext_resource path="res://items/Potion.tres" type="Resource" id=2] | ||
[ext_resource path="res://combat/battlers/BattlerTemplate.gd" type="Script" id=3] | ||
[ext_resource path="res://combat/battlers/jobs/Porcupine.tres" type="Resource" id=4] | ||
|
||
[resource] | ||
|
||
script = ExtResource( 3 ) | ||
anim = ExtResource( 1 ) | ||
stats = ExtResource( 4 ) | ||
skills = [ ] | ||
drops = [ { | ||
"chance": 0.75, | ||
"item": ExtResource( 2 ), | ||
"max_amount": 4, | ||
"min_amount": 2 | ||
} ] | ||
|
File renamed without changes.
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