Author Topic: Magic Resistance  (Read 1142 times)

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Magic Resistance
« on: 21 April 2012, 02:04:35 »
...
« Last Edit: 22 June 2012, 04:10:09 by MoLAoS »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Magic Resistance
« Reply #1 on: 21 April 2012, 06:41:01 »
There's no real way to do it, but if you really wanted a non-coding method, you could give every unit in the game its own armour type, so they'd all have just one type of armour, allowing each one to still have the strengths and weaknesses of their original armour, with an added value for magic resistance. Then you could use GAE's techtree/faction translation feature to make this unique armour type have the same name as before.

For example, "unit_a" has the armour type "unit_a", but in the techtree XML, you state that in-game, it will appear as "metal". This way "unit_b" can have the unique armour type "unit_b", yet it could also appear as "metal" in-game. Since it's actually a different value, you can assign different damage multipliers (including one when being hit by magic) in the techtree XML. In-game, the text (in the unit's info window) will still read "metal", even though the actual type is "unit_b". If that sounds confusing, just remember that a translation doesn't affect the data at all, it simply changes the text string that's shown in game.
« Last Edit: 18 June 2016, 17:42:41 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Magic Resistance
« Reply #2 on: 21 April 2012, 17:53:48 »
You'll need to be much more specific about what you want. Lots of different ways to interpret magic resistance.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Magic Resistance
« Reply #3 on: 21 April 2012, 18:08:06 »
You can use effect tags. For example, maybe this spell has effect x against humans but effect y against plants and undead.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Magic Resistance
« Reply #4 on: 21 April 2012, 18:22:43 »
You may be better off tweaking the armor system. Anything else is going to be an ugly work-around of some sort.

 

anything