Resource icon

Planetbuster 2016-10-05

A Planetbuster-Rocket, it'll destroy really all in it's catchement area :).

attachment.php


attachment.php


attachment.php



Uses the ICBM-modell.
Code is from tsentom1, also got much help from him :).

Can be used as it comes as a stand-alone-mod.
AI will use it like an ICBM, not like a special unit.



For modders:
I've added the planetbuster-unitclass and unit at the end of the unitclassinfos.xml and unitinfos.xml
In the CvEventManager.py i've added with tsentom's help this:
Spoiler :

Code:
	def onNukeExplosion(self, argsList):
		'Nuke Explosion'
		pPlot, pNukeUnit = argsList
		CvUtil.pyPrint('Nuke detonated at %d, %d'
			%(pPlot.getX(), pPlot.getY()))
###Planetbusterbegin###		
		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_PLANETBUSTER')):

                        
                        iX = pPlot.getX()
                        iY = pPlot.getY()

			for iXLoop in range(iX - 1, iX + 2, 1):
				for iYLoop in range(iY - 1, iY + 2, 1):
						pPlot = CyMap().plot(iXLoop, iYLoop)
						if (( pPlot.isPeak()==true  ) or (pPlot.isHills()==true)):
							pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True)
 						pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
###Planetbusterend###

Should be simpel to understand. If not, ask me or tsentom :).
  • planetbreaker3_rS7.jpg
    planetbreaker3_rS7.jpg
    142.4 KB · Views: 156
Author
The_J
Downloads
849
Views
849
First release
Last update

Ratings

4.00 star(s) 6 ratings

More resources from The_J

Back
Top Bottom