lushen124 / Universal-FE-Randomizer

Properly universal this time.
MIT License
98 stars 28 forks source link

FE8 Fili Shield Issue #371

Open BrannonMurphy opened 3 years ago

BrannonMurphy commented 3 years ago

Hello! I'm a bit new to this so please excuse me if I don't explain this well. I'm using the 0.9.3 version of Yune and I've just run into a minor issue. I have Tana as a Falconknight after taking the place of Vanessa. I just started using the Fili Shield with her but it doesn't seem to work. Specifically, I'm on the Renais Capital chapter and an archer's bow was glowing with and without the shield on and did the same amount of damage. I can't screen record, but I have some screenshots of before and after the shield and the unit itself.

Screenshots: withoutfilishield unitwithfili withfilishield

lushen124 commented 3 years ago

That's odd. I didn't change how the Fili shield worked. I can look into it. Do you know if it's just Tana or if it's just the Falconknight class that this doesn't work for?

BrannonMurphy commented 3 years ago

I'm not sure. If I get another one, I'll let you know!

PainfulAC commented 2 years ago

Also had this happen to my Lute as a Wyvern Lord

Vennobennu commented 2 years ago

The Fili Shield checks against two specific effectiveness pointers - the default anti-air pointer and Nidhogg's - so if you give bows a different effectiveness pointer than the default then it won't block that.

The same's happened to me in FE6 with the Delphi Shield, and I assume FE7 has the same problem.

lushen124 commented 2 years ago

Ah, so the specific pointer is being compared and not the values dereferenced by it. I'll have to put in a fix for that. That's a bit unfortunate unless it allows me to search through an array of pointers instead of a single/two pointers.

Geeene commented 1 year ago

A friend was playing a randomizer and encountered the Fili Shield bug, so I had a quick look into it, since I remembered reading this thread..

I guess the issue is caused by this piece of code:

random.gba.loader.ItemDataLoader#prepareForRandomization grafik

in combination with this: random.gba.loader.ItemDataLoader#ItemDataLoader

grafik

which replaces all the original pointers with new pointers.. I don't suppose you happen to remember why you did it this way? I don't really see a reason to re-create the effectiveness pointers in freespace..

I guess the constructor part should just set the addresses in the hashmap to these values, rather than creating new ones:

fedata.gba.general.GBAFEItemProvider#effectivenessPointerType

The creation of new effectiveness things could still be interesting for creating arbitrary (random) effective weapons in the future maybe

Edit: okay, I can see from the commit history that this was added due to the possibility of Lords randomizing into fliers and the fact that the randomizer creates copy classes for them, so this is necessary.