Allow for arbitrary buff/debuff visuals #961

Merged
merged 4 commits into from Sep 12, 2012

Conversation

Projects
None yet
4 participants
Collaborator

dorkster commented Sep 11, 2012

Closes #856

Completes most of #260. Although, right now it doesn't handle multiple visuals for effects with the same name.

Note: MenuActiveEffects could be revisited after the other status effects (stun, slow, etc) make use of the StatBlock's new effects list.

@igorko igorko commented on the diff Sep 12, 2012

src/StatBlock.cpp
@@ -516,11 +487,11 @@ void StatBlock::logic() {
}
// handle buff/debuff animations
- shield_frame++;
- if (shield_frame == 12) shield_frame = 0;
-
- vengeance_frame+= vengeance_stacks;
- if (vengeance_frame >= 24) vengeance_frame -= 24;
+ for (unsigned int i=0; i<effects.size(); i++) {
+ effects[i].frame++;
@igorko

igorko Sep 12, 2012

Collaborator

Dunno if we need this (hard to understand all logic) but maybe drop it to 0 comparing with frame_total?

@clintbellanger

clintbellanger Sep 12, 2012

Owner

That's a very hardcoded way to make Vengeance spin faster when it has more stacks. I've removed vengeance, so this code is obsolete and can be removed.

@igorko igorko commented on the diff Sep 12, 2012

mods/fantasycore/engine/effects.txt
@@ -1,11 +1,12 @@
-# hazard settings
-frame_size=64,64
-frame_offset=32,32
-
-# shield effect
-frame_size_sh=0,0,128,128
-frame_offset_sh=64,96
-
-# vengeance effect
@igorko

igorko Sep 12, 2012

Collaborator

Don't we need this?

@dorkster

dorkster Sep 12, 2012

Collaborator

Not anymore since Vengeance was removed.

@igorko igorko and 1 other commented on an outdated diff Sep 12, 2012

mods/minicore/powers/powers.txt
@@ -50,8 +38,8 @@ radius=64
speed=24
frame_loop=0
frame_duration=2
-frame_size=32,32
-frame_offset=16,32
+frame_size=64,64
@igorko

igorko Sep 12, 2012

Collaborator

Is it ok to double size for half scale?

@dorkster

dorkster Sep 12, 2012

Collaborator

Good catch, I had just copied over powers.txt and forgot to change the frame sizes. I'll fix that.

Collaborator

dorkster commented Sep 12, 2012

Tested the minicore mod and everything is working as it should with the last commit.

Collaborator

igorko commented Sep 12, 2012

Vengeance is not used at all? Than it should be removed from powers.txt too. Also there are some lines in source code.

@clintbellanger clintbellanger added a commit that referenced this pull request Sep 12, 2012

@clintbellanger clintbellanger Merge pull request #961 from dorkster/effects
Allow for arbitrary buff/debuff visuals
93368c3

@clintbellanger clintbellanger merged commit 93368c3 into clintbellanger:master Sep 12, 2012

Contributor

AMDmi3 commented on 122978e Sep 13, 2012

After this commit, enemy health bar no longer shows any text (e.g. monster name and HP). Healthbar itself still functions correctly.

Edit: forget it, this commit it unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment