Dugy / Legend_of_the_Invincibles

An add-on campaign for the Battle for Wesnoth game
GNU General Public License v3.0
40 stars 22 forks source link

Magical, guided, but not both #713

Closed white-haired-uncle closed 5 months ago

white-haired-uncle commented 5 months ago

I gave Tears of Void to a druid. She now has an aim attack which always has a 70% chance to hit. It also always has a 90% chance to hit.

Dugy commented 5 months ago

How do they stack? Magical specifically means that the chance to hit is overriden to be 70%, guided is the same but 90%, so the engine will pick one.

white-haired-uncle commented 5 months ago

During combat it shows 90%.

Dugy commented 5 months ago

That is the expected and desired behaviour. Guided is applied later, so it overrides the previous one.

white-haired-uncle commented 5 months ago

The issue is the attack description. It says both, which can't be true.

(Or maybe it can. I hated Probability and Sadistics)

Dugy commented 5 months ago

That's how the game works. If I wrote code to remove those specials that were overriden, it would feel weird to someone else.

white-haired-uncle commented 5 months ago

Well, she didn't have an aim attack until she picked up the ToV so it's not like it would really be removing anything.

And I think in the general case, no one's going to wonder why magical doesn't show up when guided (better) does, but they might wonder how they can have both.

Dugy commented 5 months ago

I don't understand your point now. He could she pick up ToV and get both magical and guided from it? It only grants guided.

white-haired-uncle commented 5 months ago

I assume it was inherited/cloned somehow from her thorns attack, since aim shares the weapon specials and damage type with it. I took ToV off her and gave it to a Seer and now it's an arcane attack for the Seer.

FWIW, the druid was holding ToV when she advanced to FI, and now aim has poison as well.

First Shyde in the recall list. Quirimea LotI1-The Beginning.gz

Dugy commented 5 months ago

That looks correct. It clones the unit's strongest ranged attack, thorns in this case, clones it, reduces its damage and adds the guided weapon special to it.

white-haired-uncle commented 5 months ago

I've never really seen any use for 'aim'. Probably because I can't remember ever giving it to a unit with a ranged attack that wasn't magical, and the difference between magical and guided isn't enough to offset the damage loss (and they're the same type, so no help there).

Dugy commented 5 months ago

It gives a 28% increased chance to hit, so it does offset the damage loss. But only by a small margin, which would mean that other amulets are probably better. So it would make sense to give it some additional bonus.

white-haired-uncle commented 5 months ago

I think it's 20% to hit (vs magic), -20% damage, which is almost a wash unless the enemy has very small HP or you're trying to poison/slow/etc. I don't mind items that don't seem to do much, or do as much as they could, but it seems if you wanted it to have a bonus it would use a different damage type (lightning?).

BTW, in item_list.cfg, we see things like this:

        damage=-50
        {QUANTITY damage -30 -40 -50}
        attacks=80
        {QUANTITY attacks 100 80 60}

Seems redundant, wondering if there's a reason for it. Don't care, just curious.

USUALLY, the (unused?) attribute matches the value for hard, though in the above one of them doesn't. That one, BTW, is from Relentless Fury, which bugs me because I can't figure out why the gui says "80 more attacks" instead of "80% more".

Dugy commented 5 months ago

I think it's 20% to hit (vs magic)

Wrong. Increasing a 70% chance to 90% chance means a 28% increased chance, because 0.7 * 1.2857 = 0.9.

If you still don't believe me, consider this:

Seems redundant, wondering if there's a reason for it. Don't care, just curious.

You don't always have the EASY, NORMAL and HARD definitions, for example in multiplayer. Therefore, there has to be a default value for cases where neither of these is defined. It should be always the same as in hard.

white-haired-uncle commented 5 months ago

Um, I gave Lethalia Tears of the Void. Granted, her ff attack does less damage (16x5 vs 20x5), but it's still kind of crazy. aim needs a new damage type (I'm loading her up with arcane pen for ff, so it would be nice if that didn't effect aim).

Dugy commented 5 months ago

Wait, you were first telling it's next to useless and now you're telling it's overpowered?

white-haired-uncle commented 5 months ago

I still think it is, but I found a case where it is "too powerful". Either way, I think it should work differently.

I think the difference is the amount of damage she does. Once you get to the point that you're going to kill pretty much any unit you attack, extra damage is wasted. So in this case, the differences is she goes from killing most units to killing almost every unit. I think it'd be more fun if she actually missed once in a while.

Dugy commented 5 months ago

It's better than nothing, and it has a niche use where it's exactly what you need. That is fine in my opinion.

white-haired-uncle commented 5 months ago

Found the niche. Shamans and mages. Both are fragile. The extra chance to hit is quite helpful trying to attain L2. Often I'll use one to attack a severely injured foe to grab XP, knowing on the off chance it misses completely .it's probably going to die on the AI turn.

Dugy commented 5 months ago

May I close this now?

white-haired-uncle commented 5 months ago

Sure. But I still think it looks bad to have magical and guided both appear in the weapon specials.

Dugy commented 5 months ago

There is no good mechanism to remove the overriden weapon special except by writing code to handle this specific case.

white-haired-uncle commented 3 months ago

Ran into this. It's picking only the best backstab special when multiple apply. Without really looking at it right now, this could be a template for picking only the best weapon accuracy when multiple apply.

https://github.com/Dugy/Legend_of_the_Invincibles/blob/9865c22ed30f91094d02791376512da160cd4a44/lua/stats.lua#L572-L590