MegaGlest Forum

MegaGlest => Feature requests => Topic started by: titi on 29 October 2013, 09:51:13

Title: Prevent levelling units by killing your own or teams units
Post by: titi on 29 October 2013, 09:51:13
Tomreyn told me that this is a serious problem regarding the tech horsemen.
And ineed you should not get a reward for killing your teammates.
Title: Re: Prevent levelling units by killing your own or teams units
Post by: Ishmaru on 29 October 2013, 12:35:16
I thought this was fixed long ago.

If it's not then I agree that it should.

While on that subject, I think we should prevent players from attack spawning by targeting own units or allies. Hope it's not too off topic.
Title: Re: Prevent levelling units by killing your own or teams units
Post by: softcoder on 29 October 2013, 13:51:23
The levelling uses enemy kills only, check the code in unit.cpp

Code: [Select]
void Unit::incKills(int team) {
++kills;
if(team != this->getTeam()) {
++enemyKills;
}

checkUnitLevel();
}

void Unit::checkUnitLevel() {
const Level *nextLevel= getNextLevel();
if(nextLevel != NULL && this->enemyKills >= nextLevel->getKills()) {
this->level= nextLevel;
 ...

Title: Re: Prevent levelling units by killing your own or teams units
Post by: titi on 29 October 2013, 13:58:12
Uh sorry   :scared: I just added this feature request because tomreyn told me about very strong horses in some games he had with "willy" and "uuu".
I promise, next time I first check .... :-[
Title: Re: Prevent levelling units by killing your own or teams units
Post by: tomreyn on 29 October 2013, 14:43:48
I think I may have (unintentionally) spread some lies here (sorry!), what really happened is this: Wily sent his horses into my base, killed a bunch of my defenseless workers, thus skilled up his horsemen to become elite, making the horsemen really hard to defeat especially when this takes place early in the game.
Title: Re: Prevent levelling units by killing your own or teams units
Post by: Djemynai on 15 December 2013, 23:36:10
Hmm, is this really such a problem?

Killing your teammate arguably shouldn't be rewarded, but even then it might be part of a bigger team strategy that your partner has consented to.

If you want to kill your own units, why not let it level you up? (And are elite horsemen really as strong as it sounds? Damnit, I might have to go back to Tech?!)
If I recall correctly, you can level up by killing your own units in Warcraft as well, but of course that doesn't mean it must be in Glest. Just saying it's not really abnormal. Anyway, it has apparently already been removed, so yeah. Probably not a big deal.

~~Djemynai