Author Topic: Bug Units always do dammage even with attack of 0  (Read 1543 times)

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Bug Units always do dammage even with attack of 0
« on: 13 April 2011, 01:52:54 »
Hey another bug i found is that even with an attack of 0 units will always do at least 1 damage per cycle.
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: Bug Units always do dammage even with attack of 0
« Reply #1 on: 13 April 2011, 01:53:44 »
This is hard coded to ensure every attack results in a minimum of 1 damage. Not sure if this is a bug or feature :)

Zoythrus

  • Guest
Re: Bug Units always do dammage even with attack of 0
« Reply #2 on: 13 April 2011, 02:06:06 »
does that affect negative damage? or will the attacker heal its target?

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Bug Units always do dammage even with attack of 0
« Reply #3 on: 13 April 2011, 03:06:48 »
This is hard coded to ensure every attack results in a minimum of 1 damage. Not sure if this is a bug or feature :)

I see... Well can there be any way to have observer or spy units that can move yet stay in position without attacking? Normally they will run away.
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

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Bug Units always do dammage even with attack of 0
« Reply #4 on: 13 April 2011, 03:15:44 »
This is hard coded to ensure every attack results in a minimum of 1 damage. Not sure if this is a bug or feature :)

I see... Well can there be any way to have observer or spy units that can move yet stay in position without attacking? Normally they will run away.
Just give them a attack skill but not a command, than they cannot attack but they will not run away.

does that affect negative damage? or will the attacker heal its target?
Nope I wanted it to heal but 1 damage is the minim.
Get the Vbros': Packs 1, 2, 3, 4, and 5!

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Bug Units always do dammage even with attack of 0
« Reply #5 on: 13 April 2011, 05:18:37 »
I see... Well can there be any way to have observer or spy units that can move yet stay in position without attacking? Normally they will run away.
Just give them a attack skill but not a command, than they cannot attack but they will not run away.
It's much more elegantly handled in GAE, so look for that after the merge.  Units with attacks can be toggled to automatically attack or not, and units without attacks (or with auto-attack turned off) can be toggled to automatically flee or not.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Bug Units always do dammage even with attack of 0
« Reply #6 on: 15 April 2011, 22:31:04 »
It would be nice if there was a way to toggle this minimum off, where any *attack* dealing zero or less damage would do nothing at all (though any effects the attack may have, in GAE, would still work), though healing should be a different skill. It wouldn't make sense for a very weak unit to attack something with very high defense and heal them.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert