Author Topic: Prevent levelling units by killing your own or teams units  (Read 920 times)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
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.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Prevent levelling units by killing your own or teams units
« Reply #1 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.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Prevent levelling units by killing your own or teams units
« Reply #2 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;
 ...


titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Prevent levelling units by killing your own or teams units
« Reply #3 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 .... :-[
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Prevent levelling units by killing your own or teams units
« Reply #4 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.
« Last Edit: 29 October 2013, 15:44:37 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

Djemynai

  • Guest
Re: Prevent levelling units by killing your own or teams units
« Reply #5 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