Page MenuHomeWildfire Games

Get attack effects from JSON.
Needs ReviewPublic

Authored by Freagarach on Mar 22 2020, 1:41 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

This loads attack effects from JSON files, allowing easier effects introduction by mods and us.
Fixes the ToDo in AttackEffects.js. Currently the files have extra information which is not used, I guess that can be just removed. Note there is a Name and a Description entry, but both are not used, hence no addition to messages.json.

Test Plan

Verify that in-game nothing has changed.

Event Timeline

Freagarach created this revision.Mar 22 2020, 1:41 PM
Owners added a subscriber: Restricted Owners Package.Mar 22 2020, 1:41 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...

binaries/data/mods/public/simulation/components/tests/test_DeathDamage.js
|   5| »   GetReceiver(effect)
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'GetReceiver'.

binaries/data/mods/public/simulation/helpers/tests/test_Attacking.js
|   5| »   GetReceiver(effect)
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'GetReceiver'.

binaries/data/mods/public/simulation/components/tests/test_Attack.js
|   5| »   GetReceiver(effect)
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'GetReceiver'.

binaries/data/mods/public/simulation/components/tests/test_Damage.js
|   5| »   GetReceiver(effect)
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'GetReceiver'.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1880/display/redirect

Too bad one still needs to modify Attacking.js in two places to be able to use a new effect,,,

Freagarach updated this revision to Diff 11535.Mar 24 2020, 2:45 PM

Use strings in test.

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...

binaries/data/mods/public/simulation/helpers/tests/test_Attacking.js
|   5| »   GetReceiver(effect)
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'GetReceiver'.

binaries/data/mods/public/simulation/components/tests/test_Damage.js
|   5| »   GetReceiver(effect)
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'GetReceiver'.

binaries/data/mods/public/simulation/components/tests/test_DeathDamage.js
|   5| »   GetReceiver(effect)
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'GetReceiver'.

binaries/data/mods/public/simulation/components/tests/test_Attack.js
|   5| »   GetReceiver(effect)
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'GetReceiver'.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1893/display/redirect