adaneslavo / More-Unique-Components-for-VP

Adds 3rd and 4th unique component to each civilization.
1 stars 6 forks source link

Goedendag Promotion not working #125

Closed pineappledan closed 6 years ago

pineappledan commented 6 years ago

Goedendag promotion is not working as intended.

The promotion's +10% for adjacent units is not being applied

adaneslavo commented 6 years ago

In current state promotion works (unit adjacent to Goedendag gets buff). Only one problem appeared: Goedendag gives itself also that +10% buff making him even more powerful.

pineappledan commented 6 years ago

Is this something that could be done in SQL with the nearbyPromotion table? Do we even need to futz about with lua?

Infixo commented 6 years ago

How exactly is it supposed to work?

adaneslavo commented 6 years ago

The ability we are talking about is second part of:

"Goedendag!" (+25% :c5strength: CS against mounted units. +10% :c5strength: CS for all adjacent ally units)

so Goedendag should give bonus to nearby units (adjacent and same tile) excluding himself. But if there are 2 Goedendags adjacent then they can give the bonus to each other.

Now it gives bonus to adjacent units AND Goedendag himself. This is an effect of using this much simplier code (one function) instead of that big lua tree we had earlier. This function looks for every unit in 0-1 range.

Infixo commented 6 years ago

Ok - so, no bonus for G. itself. Are those bonuses supposed to stack at all? I mean, on other units.

pineappledan commented 6 years ago

no, they are only supposed to be applied once. Multiple goedendags don't give the effect multiple times

Infixo commented 6 years ago

Fixed. Tested.

adaneslavo commented 6 years ago

It "almost" works. I thought about something else but pineappledan tell if I'm wrong:

We have three units: A - Goedendag, B - Goedendag, C - other unit. All units are adjacent to each other. A - gives bonus to B and C but not to self (A) B - gives bonus to A and C but not to self (B) C - gets bonuses from A and B but only one is applied. If A walks away then B loses its bonus from A, C still has one.

Now, this situation is resolved like: A - gives bonus to C B - gives bonus to C C - gets only one bonus. A and B have no bonuses.

pineappledan commented 6 years ago

Looks like the current fix resolves all issues except 1: it does not give the 10% cs boost to a goedendag if another goedendag is next to it.

Can you just add another check which looks for if a goedendag is adjacent to another goedendag?

Infixo commented 6 years ago

Guys, I think that if you write "Goedendag gives itself also that +10% buff making him even more powerful" and then you allow it to get the very same promotion from another Goedendag, making it well... "even more powerful", it's weird.

pineappledan commented 6 years ago

I'm not sure what you mean? Goedendag gets 25% vs mounted (down from 50% for most pikemen) They give 10% CS to units next to them, so that's 35% vs mounted and 10% vs everything else