Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upGeneric monster attacks, take 2: "Library of Attacks" #19702
Conversation
Coolthulhu
added some commits
Jul 14, 2016
codemime
reviewed
Dec 9, 2016
src/mattack_actors.cpp
Outdated
| @@ -10,6 +10,7 @@ | |||
| #include "sounds.h" | |||
| #include "npc.h" | |||
| #include "debug.h" | |||
| #include <algorithm> | |||
This comment has been minimized.
This comment has been minimized.
codemime
reviewed
Dec 9, 2016
src/monstergenerator.cpp
Outdated
|
|
||
| void mattack_actor::load( JsonObject &jo, const std::string &src ) | ||
| { | ||
| bool strict = src == "core"; |
This comment has been minimized.
This comment has been minimized.
codemime
reviewed
Dec 9, 2016
src/mattack_actors.cpp
Outdated
| { | ||
| damage_max_instance = damage_instance::physical( 9, 0, 0, 0 ); | ||
| min_mul = 0.5f; | ||
| max_mul = 1.0f; | ||
| move_cost = 100; | ||
| } | ||
|
|
||
| void bite_actor::load( JsonObject &obj ) | ||
| void load_if_available( std::string &to, JsonObject &obj, const std::string &id, | ||
| const std::string &def ) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I assume this will warrant reporting on #19376 when it is merged, if it changes monster files. @pisskop and @chaosvolt would need to update their mods. |
Coolthulhu
added some commits
Dec 10, 2016
Coolthulhu
changed the title
[WiP][CR]Generic monster attacks, take 2: "Library of Attacks"
Generic monster attacks, take 2: "Library of Attacks"
Dec 10, 2016
This comment has been minimized.
This comment has been minimized.
|
Eh? Sure, I guess. Wait, JSON API? :V |
This comment has been minimized.
This comment has been minimized.
|
See issue mentioned by me above, reporting major JSON changes. |
codemime
reviewed
Dec 19, 2016
src/mattack_common.h
Outdated
| struct mtype_special_attack { | ||
| protected: | ||
| // @todo Remove friend | ||
| friend class mtype; |
This comment has been minimized.
This comment has been minimized.
Coolthulhu
added some commits
Jan 22, 2017
This comment has been minimized.
This comment has been minimized.
|
Should be working now. |
codemime
self-assigned this
Jan 22, 2017
codemime
merged commit ac528f6
into
CleverRaven:master
Jan 22, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Coolthulhu commentedDec 9, 2016
•
edited
This got pretty giant. Recreating PR instead of reopening #17679 because it got some giant updates.
Contains the generic melee attacks as in #17679 but also a "library of monster attacks" which works as follows:
MonsterGenerator::attack_mapiusefunctionstest_mode(--check-mods)For example:
It is also possible to use the array definition (
"special_attacks": [ [ "nibble", 2 ] ]).EDIT: Added a doc: https://github.com/CleverRaven/Cataclysm-DDA/wiki/Monster-special-attacks