Medic

Flying Pig

Utrinque Paratus
Retired Moderator
Joined
Jan 24, 2009
Messages
15,647
Location
Perfidious Albion
This is a simple mod component to the game. It adds a new unit, the Medic. This unit starts with a promotion which gives it a huge ability to heal soldiers and the power to add health to your cities, but it has no combat ability and you can only have three at a time. It is taken from the upcoming Falklands War mod.

If you download it, please give some feedback. Part of the reason that I posted this here was to get an idea of how the unit works in a regular game. Credit is due to Mechaerik (who re-boned the marine to make the basics of the unit model) and The_J (whose Celebrity promotion was the basis for much of the code).

Download here
 
Nice idea :goodjob:, should have thought of it myself.


Looking at the code: You forgot to add the part, where the health is removed from the city when the unit leaves it.

And i guess, in the mod no other unit can get the promotion, right?
Because at the moment, the AI promoting routine whould base the promoting decission on the happiness in the city, not on the health.
I mean this part:
PHP:
(thiscity.getPopulation ()>thiscity.happyLevel())

You should change happyLevel() to goodHealth (), that would be the right equivalent ;).
 
Couldn't the ability to give health to a city (while the unit is in the city that is) be given to some sort of "UN Peacekeeper" unit as well?
 
Is this the bit I forgot:

Code:
							   elif pOldPlot.isCity():
                                pCity=pOldPlot.getPlotCity()
                                if pCity.getOwner ()==pUnit.getOwner ():
                                    pCity.changeExtraHealth(-1)
 
Couldn't the ability to give health to a city (while the unit is in the city that is) be given to some sort of "UN Peacekeeper" unit as well?

Why not?

Is this the bit I forgot:

Code:
							   elif pOldPlot.isCity():
                                pCity=pOldPlot.getPlotCity()
                                if pCity.getOwner ()==pUnit.getOwner ():
                                    pCity.changeExtraHealth(-1)

:yup: right, that's missing.
 
Back
Top Bottom