Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: snateraar on Mar 13th, 2013  |  syntax: None  |  size: 20.04 KB  |  views: 2,006  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ## Copyright (c) 2012, Electronic Arts Inc. All rights reserved.
  2.  
  3. ###########################################
  4. ## CHEAT BUGS -- Use placeable bugs to make fill/empty resources
  5. ##
  6. ## Cheating is fun
  7. ###########################################
  8.  
  9. ## Cheating Trades
  10.  
  11. ## When you want to cheat, these bugs may be helpful.
  12.  
  13. # This just allows us to create cheat bugs that can add Power, Water, Sewage and whatever else is needed
  14. define IWantToCheat( What Thing )
  15.  
  16.     unitRule CreateBug_&{What}&{Thing}
  17.         maxApplyCount
  18.         timeTrigger hour 0 -fromCreate -count 1
  19.  
  20.         ## Fill / Empty either Connected, Global, or Package
  21.         if ( match (&{What}, "Fill"))
  22.             #nearby &{Thing} out 1
  23.         elseif ( match (&{What}, "Empty"))
  24.             #nearby &{Thing} in 1
  25.         elseif ( match (&{What}, "FillConnected"))
  26.             connected &{Thing} out 1
  27.         elseif ( match (&{What}, "EmptyConnected"))
  28.              connected &{Thing} in 1
  29.         elseif ( match (&{What}, "FillGlobal"))
  30.             global &{Thing} out 1
  31.         elseif ( match (&{What}, "EmptyGlobal"))
  32.             global &{Thing} in 1
  33.         elseif ( match (&{What}, "GetPackage"))
  34.             local &{Thing} atLeast 1
  35.         elseif ( match (&{What}, "SendPackage"))
  36.             local &{Thing} in 1
  37.             package &{Thing} out 1
  38.         endif
  39.         successEvent text "&{What} &{Thing}!"
  40.         failEvent text "failed!"
  41.         chain CreateBug_Destroy
  42.     end
  43.  
  44.  
  45. enddef
  46.  
  47.  
  48.  
  49. unitRule CreateBug_Destroy
  50.     onSuccess -destroyUnit  # destroy
  51.     onFail -destroyUnit     # and destroy... no survivors!
  52. end
  53.  
  54.  
  55. create IWantToCheat(Fill Power)         # This allows you to add power  (you act as a package)
  56. create IWantToCheat(Fill Water)         # """
  57. #create IWantToCheat(Fill Sewage)        # """
  58. create IWantToCheat(Fill Garbage)       # """
  59. create IWantToCheat(Fill StudentStudyingE2)
  60. create IWantToCheat(Fill StudentStudyingE3)
  61. create IWantToCheat(Fill Coal)          # """
  62. #create IWantToCheat(Fill TotalWorkers)       # """
  63. create IWantToCheat(FillConnected Connected)
  64. create IWantToCheat(FillGlobal Simoleons) # make me rich dude
  65.  
  66. #create IWantToCheat(Empty Power)        # This cheat allows you to empty power
  67. #create IWantToCheat(Empty Water)        # same but with water
  68. #create IWantToCheat(Empty Sewage)       # " " Sewage
  69. #create IWantToCheat(Empty Garbage)
  70. #create IWantToCheat(Empty StudentStudyingE2)
  71. #create IWantToCheat(Empty StudentStudyingE3)
  72. create IWantToCheat(Empty Coal)
  73. #create IWantToCheat(Empty TotalWorkers)
  74. create IWantToCheat(EmptyConnected Connected)
  75. create IWantToCheat(EmptyGlobal Simoleons) # make me rich dude
  76. #create IWantToCheat(UnlockAll) #
  77.  
  78. define TradingCheatWithSpecificValue( operator thing value )
  79.  
  80.     unitRule CreateBug_Trading&{operator}&{thing}
  81.         applyCount &{value}
  82.         timeTrigger hour 0 -fromCreate -count 1
  83.         ## Add or subtract
  84.         if ( match (&{operator}, "AddTo"))
  85.             connected &{thing} out 1
  86.         # print "added to a thing"
  87.         else
  88.         connected &{thing} in 1
  89.         endif
  90.         chain CreateBug_TradingDestroy
  91.     end
  92.  
  93. enddef
  94.  
  95. unitRule CreateBug_TradingDestroy
  96.     onSuccess -destroyUnit  # destroy
  97.     onFail -destroyUnit     # and destroy... no survivors!
  98. end
  99.  
  100. create TradingCheatWithSpecificValue( AddTo            Water                10  )
  101. create TradingCheatWithSpecificValue( AddTo            Power                16  )
  102. create TradingCheatWithSpecificValue( AddTo            FireTruckT2          1   )
  103. create TradingCheatWithSpecificValue( AddTo            Ambulance            1   )
  104. create TradingCheatWithSpecificValue( AddTo            HazMatTruck          1   )
  105. create TradingCheatWithSpecificValue( AddTo            ResidentW1           25  )
  106.  
  107. create TradingCheatWithSpecificValue( SubtractFrom     Water                10  )
  108. create TradingCheatWithSpecificValue( SubtractFrom     Power                16  )
  109. create TradingCheatWithSpecificValue( SubtractFrom     FireTruckT2          1   )
  110. create TradingCheatWithSpecificValue( SubtractFrom     Ambulance            1   )
  111. #create TradingCheatWithSpecificValue( SubtractFrom     HazMatTruck          1   )
  112. create TradingCheatWithSpecificValue( SubtractFrom     ResidentW1           25  )
  113.  
  114.  
  115.  
  116. unitRule CreateBug_MakeTradingConnection
  117.     # Note that this will only create one city connection - all other connections will be sim nation connections
  118.     applyCount 1
  119.     timeTrigger hour 0 -fromCreate -count 1
  120.     connected Connected is 0
  121.     #connected NumberOfConnections atLeast 1
  122.     onSuccess CreateBug_FillTradeConnectionsBins
  123.     onFail -destroyUnit
  124. end
  125.  
  126. unitRule CreateBug_FillTradeConnectionsBins
  127.     maxApplyCount
  128.     # allow trades
  129.     #connected FireTradeToken out 1
  130.     #connected HealthTradeToken out 1
  131.     #connected EducationE2TradeToken out 1
  132.     #connected GarbageTradeToken out 1
  133.     connected Connected out 1
  134.  
  135.     # allow dispatching in box
  136.     #connected FireTradeTokenDispatch out 1
  137.     #connected HealthTradeTokenDispatch out 1
  138.     #connected EducationE2TradeTokenDispatch out 1
  139.     #connected GarbageTradeTokenDispatch out 1
  140.     onSuccess -destroyUnit
  141.     onFail -destroyUnit
  142. end
  143.  
  144. unitRule Cheat_SendHelicopterTest1
  145.     applyCount 1
  146.     timeTrigger Hour 0.01 -fromCreate -count 1
  147.     options -createAgent FireHelicopter
  148.     agent FireHelicopter out 1
  149.     options -sendTo Nowhere -using Helicopter
  150.     onSuccess -destroyUnit
  151.  
  152. end
  153.  
  154. ### add hourly income
  155.  
  156. unitRule Cheats_AddHourlyIncome
  157.     applyCount 1 5000
  158.     global Income out 1
  159.     global IncomeFromIW3 out 1
  160.     global AdjustedIncome out 1
  161.     onSuccess -destroyUnit
  162.     onFail -destroyUnit
  163. end
  164.  
  165.  
  166. ## Agent sending cheats (we should try and macro this eventaully too!)
  167.  
  168. define Cheat_SendFireTruck( tier )
  169.     unitRule Cheat_SendFireTruck&{tier}
  170.         applyCount 1
  171.         options -createAgent FireTruck&{tier}
  172.         agent FireTruck&{tier} out 1
  173.         onSuccess Cheat_SendFireTruck_LoadFirefighters
  174.     end
  175. enddef
  176.  
  177. unitRule Cheat_SendFireTruck_LoadFirefighters
  178.     maxApplyCount
  179.     agent Firefighter out 1
  180.     options -sendTo ActiveFire -using CarTraffic #-or FireTruck&{tier}Garage
  181.     onSuccess -destroyUnit
  182. end
  183.  
  184. create Cheat_SendFireTruck( T1 )
  185. create Cheat_SendFireTruck( T2 )
  186.  
  187. unitRule Cheat_SendHazMatTruck
  188.     applyCount 1
  189.     options -createAgent HazMatTruck
  190.     agent HazMatTruck out 1
  191.     options -sendTo HazMatFire -or HazMatGarage -using CarTraffic #-ifPossible
  192.     onSuccess -destroyUnit
  193. end
  194.  
  195.  
  196. unitRule Cheat_TargetCheat
  197.     applyCount 1
  198.     options -createAgent CriminalSignal
  199.     agent CriminalRequest out 1
  200.     options -sendTo Cheat_SetAsTarget -using radial -dieAfter 1 #-ifPossible
  201.     onSuccess -destroyUnit
  202.     onFail -destroyUnit
  203. end
  204.  
  205. unitRule Cheat_TriggerGeneralVignette
  206.     applyCount 1
  207.     options -sendTo Cheat_TriggerGeneralVignette -via sendTo -using radial -dieAfter 20
  208.     onSuccess -destroyUnit
  209.     onFail -destroyUnit
  210. end
  211.  
  212. unitRule Cheat_ReceiveTriggerGeneralVignette
  213.     applyCount 1
  214.     successEvent vignette GeneralID -start
  215. end
  216.  
  217. define Cheat_SendCoalTruck( tier transport)
  218.     unitRule Cheat_SendCoalTruck&{tier}
  219.         options -createAgent &{transport}_Coal
  220.         agent Coal out 1000
  221.         options -sendTo GreatWorksCoalConsumer -or CoalConsumer_Road -or CoalConsumerStorage_Road -or MovingOutOfTheCity -using CarTraffic
  222.         onSuccess -destroyUnit
  223.     end
  224. enddef
  225.  
  226. create Cheat_SendCoalTruck ( T1 T_Coal_T1_SmallTruck )
  227. create Cheat_SendCoalTruck ( T2 T_Coal_T2_LargeTruck )
  228.  
  229.  
  230. define Cheat_SendPatrolCar ( vehicle )
  231.     unitRule Cheat_Send&{vehicle}
  232.         options -createAgent &{vehicle}
  233.         agent Police out 1
  234.         options -sendTo CrimeInProgress -using CarTraffic
  235.         onSuccess -destroyUnit
  236.     end
  237. enddef
  238.  
  239. create Cheat_SendPatrolCar ( PatrolCar )
  240. #create Cheat_SendPatrolCar ( FrenchPatrolCar )
  241.  
  242. unitRule Cheat_SendAmbulance
  243.     applyCount 1
  244.     options -createAgent Ambulance
  245.     agent Ambulance out 1
  246.     options -sendTo NeedsAmbulance -or AmbulanceGarage -or MovingOutOfTheCity
  247.     successEvent audio play_ambulance_dispatch
  248.     onSuccess -destroyUnit
  249. end
  250.  
  251. ## Send Generic Rail Macro
  252.  
  253. # rail cheat macro
  254.  
  255. define CheatRail_( vehicle )
  256.     unitRule CheatRail_&{vehicle}
  257.         options -createAgent &{vehicle}
  258.         agent &{vehicle} out 1
  259.         options -sendTo NowhereRail -using LightRail
  260.         onSuccess -destroyUnit
  261.     end
  262. enddef
  263.  
  264. create CheatRail_( LightTrainT1 )
  265.  
  266. define CheatHeavyRail_( vehicle )
  267.     unitRule CheatHeavyRail_&{vehicle}
  268.         options -createAgent &{vehicle}
  269.         agent &{vehicle} out 1
  270.         options -sendTo NowhereHeavyRail -using HeavyRail
  271.         onSuccess -destroyUnit
  272.     end
  273. enddef
  274.  
  275. create CheatHeavyRail_( TrainT2 )
  276. #create CheatHeavyRail_( GermanTrainT2 )
  277.  
  278.  
  279. ## Send Generic Vehicle Macro
  280.  
  281. # vehicle cheat macro
  282.  
  283. define Cheat_( vehicle transport )
  284.     unitRule Cheat_&{transport}
  285.         options -createAgent &{transport}
  286.         agent &{vehicle} out 1
  287.         options -sendTo Nowhere -using CarTraffic
  288.         onSuccess -destroyUnit
  289.     end
  290. enddef
  291.  
  292. #create Cheat_( BusT2 LondonBusT2 )
  293. create Cheat_( BusT2 BusT2 )
  294. create Cheat_( CruiseShipT2 CruiseShipT2 )
  295.  
  296. define Cheat_ConstructionTruck( density )
  297.     unitRule Cheat_ConstructionTruck&{density}
  298.         options -createAgent ConstructionTruck&{density}
  299.         agent ConstructionTruck&{density} out 1
  300.         options -sendTo ConstructionResLocation&{density} -or ConstructionLocation&{density} -using CarTraffic
  301.         onSuccess -destroyUnit
  302.     end
  303. enddef
  304.  
  305. create Cheat_ConstructionTruck( D1 )
  306. create Cheat_ConstructionTruck( D2 )
  307. create Cheat_ConstructionTruck( D3 )
  308.  
  309. # custom vehicle cheats that don't fit the macro
  310.  
  311. unitRule Cheat_FreightTruckGenD1_Empty
  312.     options -createAgent FreightTruckGenD1_Empty
  313.     agent FreightTruckGenD1 out 1
  314.     options -sendTo Nowhere -using CarTraffic
  315.     onSuccess -destroyUnit
  316. end
  317.  
  318. unitRule Cheat_FireInspectorTransport
  319.     options -createAgent FireInspectorTransport
  320.     agent FireInspector out 1
  321.     options -sendTo Nowhere -using CarTraffic
  322.     onSuccess -destroyUnit
  323. end
  324.  
  325. ## Work/Shop/Home W1/W2/W3 Pedestrian Generator
  326.  
  327. define Cheat_SendPedMulti( number wealth destination next )
  328.     unitRule Cheat_SendPedMulti_&{number}
  329.         applyCount 1
  330.         global CheatSendPedMulti is &{number}
  331.         onSuccess Cheat_SendPedMulti_&{number}_MakeAgent
  332.         if ( not match (&{next}, "0"))
  333.             onFail Cheat_SendPedMulti_&{next}
  334.         endif
  335.     end
  336.  
  337.     unitRule Cheat_SendPedMulti_&{number}_MakeAgent
  338.         applyCount 1
  339.         if (match(&{destination},"Shop"))
  340.             agent SimShopperW&{wealth} out 1
  341.         else
  342.             agent SimWorkerW&{wealth} out 1
  343.         endif
  344.         if (match(&{destination},"Home"))
  345.             options -sendTo &{destination}W&{wealth}Worker_Sidewalk -via Transport_PedestrianW&{wealth}
  346.         else
  347.             options -sendTo &{destination}W&{wealth}_Sidewalk -via Transport_PedestrianW&{wealth}
  348.         endif
  349.         onSuccess Cheat_SendPedMulti_Inc
  350.     end
  351. enddef
  352.  
  353. create Cheat_SendPedMulti(0 1 Home 1)
  354. create Cheat_SendPedMulti(1 1 Work 2)
  355. create Cheat_SendPedMulti(2 1 Shop 3)
  356. create Cheat_SendPedMulti(3 2 Home 4)
  357. create Cheat_SendPedMulti(4 2 Work 5)
  358. create Cheat_SendPedMulti(5 2 Shop 6)
  359. create Cheat_SendPedMulti(6 3 Home 7)
  360. create Cheat_SendPedMulti(7 3 Work 8)
  361. create Cheat_SendPedMulti(8 3 Shop 0)
  362.  
  363. unitRule Cheat_SendPedMulti_Inc
  364.     applyCount 1
  365.     global CheatSendPedMulti out 1
  366.     onSuccess Cheat_Die
  367.     onFail Cheat_SendPedMulti_Reset
  368. end
  369.  
  370. unitRule Cheat_SendPedMulti_Reset
  371.     maxApplyCount
  372.     global CheatSendPedMulti in 1
  373.     chain Cheat_Die
  374. end
  375. ## Work/Shop/Home W1/W2/W3 Car Generator
  376.  
  377. define Cheat_SendCarMulti( number wealth destination next )
  378.     unitRule Cheat_SendCarMulti_&{number}
  379.         applyCount 1
  380.         global CheatSendCarMulti is &{number}
  381.         onSuccess Cheat_SendCarMulti_&{number}_MakeAgent
  382.         if ( not match (&{next}, "0"))
  383.             onFail Cheat_SendCarMulti_&{next}
  384.         endif
  385.     end
  386.  
  387.     unitRule Cheat_SendCarMulti_&{number}_MakeAgent
  388.         applyCount 1
  389.         if (match(&{destination},"Shop"))
  390.             agent SimShopperW&{wealth} out 1
  391.         else
  392.             agent SimWorkerW&{wealth} out 1
  393.         endif
  394.         agent FromTradingConnection out 1
  395.         if (match(&{destination},"Home"))
  396.             options -sendTo &{destination}W&{wealth}Worker_Sidewalk -or MovingOutOfTheCity -via Transport_CarW&{wealth}
  397.         else
  398.             options -sendTo &{destination}W&{wealth}_Road -or MovingOutOfTheCity -via Transport_CarW&{wealth}
  399.         endif
  400.         onSuccess Cheat_SendCarMulti_Inc
  401.     end
  402. enddef
  403.  
  404. create Cheat_SendCarMulti(0 1 Home 1)
  405. create Cheat_SendCarMulti(1 1 Work 2)
  406. create Cheat_SendCarMulti(2 1 Shop 3)
  407. create Cheat_SendCarMulti(3 2 Home 4)
  408. create Cheat_SendCarMulti(4 2 Work 5)
  409. create Cheat_SendCarMulti(5 2 Shop 6)
  410. create Cheat_SendCarMulti(6 3 Home 7)
  411. create Cheat_SendCarMulti(7 3 Work 8)
  412. create Cheat_SendCarMulti(8 3 Shop 0)
  413.  
  414. unitRule Cheat_SendCarMulti_Inc
  415.     applyCount 1
  416.     global CheatSendCarMulti out 1
  417.     onSuccess Cheat_Die
  418.     onFail Cheat_SendCarMulti_Reset
  419. end
  420.  
  421. unitRule Cheat_SendCarMulti_Reset
  422.     maxApplyCount
  423.     global CheatSendCarMulti in 1
  424.     chain Cheat_Die
  425. end
  426.  
  427.  
  428. ## Car Generator
  429.  
  430. unitRule Cheat_SendCar
  431.     applyCount 1
  432.     global CheatCycle is 0
  433.     onSuccess Cheat_SendCarW1
  434.     onFail Cheat_SendCarW2_Test
  435. end
  436.  
  437. unitRule Cheat_SendCarW2_Test
  438.     applyCount 1
  439.     global CheatCycle is 1
  440.     onSuccess Cheat_SendCarW2
  441.     onFail Cheat_SendCarW3
  442. end
  443.  
  444. unitRule Cheat_SendCarW1
  445.     applyCount 1
  446.     agent SimWorkerW1 out 1
  447.     agent FromTradingConnection out 1
  448.     options -sendTo HomeW1Worker_Sidewalk -or MovingOutOfTheCity -via Transport_CarW1 -using CarTraffic
  449.     chain Cheat_CyclePlusOne
  450. end
  451.  
  452. unitRule Cheat_SendCarW2
  453.     applyCount 1
  454.     agent SimWorkerW2 out 1
  455.     agent FromTradingConnection out 1
  456.     options -sendTo HomeW2Worker_Sidewalk -or MovingOutOfTheCity  -via Transport_CarW2 -using CarTraffic
  457.     chain Cheat_CyclePlusOne
  458. end
  459.  
  460. unitRule Cheat_SendCarW3
  461.     applyCount 1
  462.     agent SimWorkerW3 out 1
  463.     agent FromTradingConnection out 1
  464.     options -sendTo HomeW3Worker_Sidewalk -or MovingOutOfTheCity  -via Transport_CarW3 -using CarTraffic
  465.     chain Cheat_CycleReset
  466. end
  467.  
  468.  
  469. ## Pedestrian Generator
  470.  
  471. #Sends one of each type of pedestrian
  472.  
  473. unitRule Cheat_SendPedestrians
  474.     applyCount 1
  475.     agent SimWorkerW1 out 1
  476.     options -sendTo HomeW1Worker_Sidewalk -or MovingOutOfTheCityPedestrian -via Transport_PedestrianW1 -using PedestrianTraffic
  477.     chain Cheat_SendPedestriansW1
  478. end
  479.  
  480. unitRule Cheat_SendPedestriansW1
  481.     applyCount 1
  482.     agent SimWorkerW1 out 1
  483.     options -sendTo HomeW1Worker_Sidewalk -or MovingOutOfTheCityPedestrian -via Transport_PedestrianW1 -using PedestrianTraffic
  484.     chain Cheat_SendMorePedestriansW1
  485. end
  486.  
  487. unitRule Cheat_SendMorePedestriansW1
  488.     applyCount 1
  489.     agent SimWorkerW1 out 1
  490.     options -sendTo HomeW1Worker_Sidewalk -or MovingOutOfTheCityPedestrian -via Transport_PedestrianW1 -using PedestrianTraffic
  491.     chain Cheat_SendPedestriansW2
  492. end
  493.  
  494.  
  495. unitRule Cheat_SendPedestriansW2
  496.     applyCount 1
  497.     agent SimWorkerW2 out 1
  498.     options -sendTo HomeW2Worker_Sidewalk -or MovingOutOfTheCityPedestrian -via Transport_PedestrianW2 -using PedestrianTraffic
  499.     chain Cheat_SendPedestriansW3
  500. end
  501.  
  502. unitRule Cheat_SendPedestriansW3
  503.     applyCount 1
  504.     agent SimWorkerW3 out 1
  505.     options -sendTo HomeW3Worker_Sidewalk -or MovingOutOfTheCityPedestrian -via Transport_PedestrianW3 -using PedestrianTraffic
  506.     chain Cheat_SendKid
  507. end
  508.  
  509.  
  510. unitRule Cheat_SendKid
  511.  
  512.     applyCount 1
  513.     agent KidE2 out 1
  514.     options -sendTo HomeKid_Sidewalk -or MovingOutOfTheCityPedestrian -via Transport_KidE2 -using PedestrianTraffic
  515.  
  516. end
  517.  
  518.  
  519. #Sends a single pedestrian, cycling through W1, W2, and W3
  520.  
  521. unitRule Cheat_SendPedestrian
  522.     applyCount 1
  523.     global CheatCycle is 0
  524.     onSuccess Cheat_SendPedestrianW1
  525.     onFail Cheat_SendPedestrianW2_Test
  526. end
  527.  
  528. unitRule Cheat_SendPedestrianW2_Test
  529.     applyCount 1
  530.     global CheatCycle is 1
  531.     onSuccess Cheat_SendPedestrianW2
  532.     onFail Cheat_SendPedestrianW3
  533. end
  534.  
  535. unitRule Cheat_SendPedestrianW1
  536.     applyCount 1
  537.     agent SimWorkerW1 out 1
  538.     options -sendTo HomeW1Worker_Sidewalk -or MovingOutOfTheCityPedestrian -via Transport_PedestrianW1 -using PedestrianTraffic
  539.     chain Cheat_CyclePlusOne
  540. end
  541.  
  542. unitRule Cheat_SendPedestrianW2
  543.     applyCount 1
  544.     agent SimWorkerW2 out 1
  545.     options -sendTo HomeW2Worker_Sidewalk -or MovingOutOfTheCityPedestrian -via Transport_PedestrianW2 -using PedestrianTraffic
  546.     chain Cheat_CyclePlusOne
  547. end
  548.  
  549. unitRule Cheat_SendPedestrianW3
  550.     applyCount 1
  551.     agent SimWorkerW3 out 1
  552.     options -sendTo HomeW3Worker_Sidewalk -or MovingOutOfTheCityPedestrian -via Transport_PedestrianW3 -using PedestrianTraffic
  553.     chain Cheat_CycleReset
  554. end
  555.  
  556.  
  557. ## State Change Rules
  558.  
  559. # Test for 'vacant'
  560. unitRule Cheat_CycleState
  561.     timeTrigger hour 0 -fromCreate -count 1
  562.     applyCount 1
  563.     global CheatCycle is 0
  564.     onSuccess Cheat_CyclePlusOne
  565.     onFail Cheat_SendState_Abandoned_Test
  566. end
  567.  
  568. # Test for 'abandoned'
  569. unitRule Cheat_SendState_Abandoned_Test
  570.     applyCount 1
  571.     global CheatCycle is 1
  572.     onSuccess Cheat_SendState_Abandoned
  573.     onFail Cheat_SendState_Rubble_Test
  574. end
  575.  
  576. # Test for 'rubble'
  577. unitRule Cheat_SendState_Rubble_Test
  578.     applyCount 1
  579.     global CheatCycle is 2
  580.     onSuccess Cheat_SendState_Rubble
  581.     onFail Cheat_SendState_UnderConstruction_Test
  582. end
  583.  
  584. # Test for 'under construction', otherwise 'normal'
  585. unitRule Cheat_SendState_UnderConstruction_Test
  586.     applyCount 1
  587.     global CheatCycle is 3
  588.     onSuccess Cheat_SendState_UnderConstruction
  589.     onFail Cheat_SendState_Normal
  590. end
  591.  
  592. # Set state to 'Abandoned'
  593. unitRule Cheat_SendState_Abandoned
  594.     maxApplyCount
  595.     agent Abandoned out 1
  596.     options -sendTo StateChange -via StateChange -dieAfter 1
  597.     chain Cheat_CyclePlusOne
  598. end
  599.  
  600. # Set state to 'Rubble'
  601. unitRule Cheat_SendState_Rubble
  602.     maxApplyCount
  603.     agent Rubble out 1
  604.     options -sendTo StateChange -via StateChange -dieAfter 1
  605.     chain Cheat_CyclePlusOne
  606. end
  607.  
  608. # Set state to 'Under Construction'
  609. unitRule Cheat_SendState_UnderConstruction
  610.     maxApplyCount
  611.     agent UnderConstruction out 1
  612.     options -sendTo StateChange -via StateChange -dieAfter 1
  613.     chain Cheat_CyclePlusOne
  614. end
  615.  
  616. # Set state to 'Normal'
  617. unitRule Cheat_SendState_Normal
  618.     maxApplyCount
  619.     agent Normal out 1
  620.     options -sendTo StateChange -via StateChange -dieAfter 1
  621.     chain Cheat_CycleReset
  622. end
  623.  
  624.  
  625. # turn vandalism on/off sink rules
  626.  
  627. #unitRule Cheat_VandalismOn
  628. #    maxApplyCount
  629. #    local VandalismLevel out 1
  630. #end
  631.  
  632. #unitRule Cheat_VandalismOff
  633. #    maxApplyCount
  634. #    local VandalismLevel in 1
  635. #end
  636.  
  637.  
  638. ## Cycle Rules
  639.  
  640. unitRule Cheat_CyclePlusOne
  641.     applyCount 1
  642.     global CheatCycle out 1
  643.     chain Cheat_Die
  644. end
  645.  
  646. unitRule Cheat_CycleReset
  647.     maxApplyCount
  648.     global CheatCycle in 1
  649.     chain Cheat_Die
  650. end
  651.  
  652. unitRule Cheat_Die
  653.     onSuccess -destroyUnit
  654.     onFail -destroyUnit
  655. end
  656.  
  657. ## Traffic
  658.  
  659. unitRule Cheat_AddTraffic
  660.  
  661.     maxApplyCount
  662.     options -region D
  663.     map Density_D2 out 1
  664.     map Density_D3 out 1
  665.  
  666.     chain Cheat_Die
  667. end
  668.  
  669. unitRule Cheat_RemoveTraffic
  670.  
  671.     maxApplyCount
  672.     options -region D
  673.     map Density_D2 in 1
  674.     map Density_D3 in 1
  675.  
  676.     chain Cheat_Die
  677. end
  678.  ##Make the city D2
  679.  
  680. unitRule Cheat_MakeD2
  681.  
  682.     maxApplyCount
  683.     options -region D
  684.  
  685.     map Density_D2 out 1
  686.     map Density_D3 out 1
  687.     chain Cheat_Die
  688. end
  689.  
  690. unitRule CreateBug_AddDensityD2
  691.    
  692.     options -region A
  693.     map Density_D2 out 1
  694.     chain Cheat_Die    
  695. end
  696.  
  697. unitRule CreateBug_AddDensityD3
  698.    
  699.     options -region A
  700.     map Density_D3 out 1
  701.     chain Cheat_Die    
  702. end
  703.  
  704. #unitRule Cheat_MakeW2
  705.  
  706. #    maxApplyCount
  707. #    options -region D
  708. #    map Desirability_CW2 out 500
  709. #    map Desirability_CW3 out 500
  710. #    map Desirability_RW2 out 500
  711. #    map Desirability_RW3 out 500
  712. #    chain Cheat_Die
  713. #end