Comments (5)
Might be good to define commands as a resource type that you can attach to things. This could allow you to more easily define commands that can be shared across multiple types, such as items that can cast magic for characters who can't typically use magic, as well as define monster AI rules that allow them to select their move from a provided list of commands.
from godot-open-rpg.
Agreed with @nhydock ! Attack is already a CombatAction, and there's a base class to use for actions in general. I'm not sure how to best implement each specific action so suggestions welcome.
I would definitely have skills and items as Resources. I would also have the element hold a method that does the action. E.g. for a HealingPotion:
func use(target):
# healing code and checks
target.stats.health += HEALING_POWER
It makes sense for the potion itself to heal or the lightning strike to damage the opponent. Although there may be shortcomings to this approach I can't see now.
from godot-open-rpg.
FYI I'm working on this issue
from godot-open-rpg.
@MarianoGnu I was looking at this this morning as well to spruce up how skills are implemented and have some ideas. Will push up some code to my fork in a few hours if you want to have a look at what I was thinking.
from godot-open-rpg.
@nhydock already created the PR, take a look if it's mor or less what you was thinking of.
from godot-open-rpg.
Related Issues (20)
- Attacking one monster attacks them all HOT 4
- Error when trying to get rewards from a quest
- CompleteQuestAction: error if trying to complete an already-completed quest
- Remove the Localmap's Grid YSort HOT 1
- OpenRPG code rewrite HOT 11
- Duplicating Visual Script node loses custom script reference HOT 3
- Resources broken when project is exported to an .exe HOT 3
- One gray pixel line appear on tiles, when the camara moves HOT 2
- Auto battle HOT 1
- I want an example that only includes the turn combat system, but there is too much in this example. HOT 1
- Dialogue path is wrong
- Drop chance is ignored HOT 5
- rpg
- DialogueCombatPawn loops dialogue if Enter key is pressed HOT 1
- OpenRPG rewrite: Godot 4.X HOT 14
- Contributors guide link in readme leads to 404 HOT 1
- Add event sequences (dialogue, map changes, cutscenes, etc.) HOT 1
- Feature implementation: v 0.3.0 - Player Progression HOT 7
- QUERY: is there any accompanying dev documents or vedios available? HOT 1
- Combat Milestone HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot-open-rpg.