Skip to content

Commit

Permalink
Buffed turrets, especially M3G.
Browse files Browse the repository at this point in the history
  • Loading branch information
Epicguru committed Jan 8, 2021
1 parent ecbd3c1 commit 15cef5f
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 31 deletions.
5 changes: 3 additions & 2 deletions Defs/Buildings/Special/M3G_UMIN.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<label>M3G_UMIN</label>
<description>Fires a beam of energy up to an ancient geostationary satelite, where it is reflected towards a specific coordinate on the planet surface.
The beam incinerates all living things and quickly destroys any structures in the blast radius.

Firing the beam of energy creates a huge electromagnetic pulse in both the area it is fired from and also the area it impacts on, temporarily shutting down all electronics.</description>
<graphicData>
<texPath>AntimatterAnnihilation/Buildings/M3G_UMIN</texPath>
Expand Down Expand Up @@ -50,7 +51,7 @@ Firing the beam of energy creates a huge electromagnetic pulse in both the area
<storedEnergyMax>600</storedEnergyMax> <!-- Required when using this component. Does not actually represent real max. -->
<transmitsPower>true</transmitsPower>

<maxPull>500000</maxPull> <!-- 500KW max pull from other batteries. There is infinite input power from other sources, just like with vanilla batteries. -->
<maxPull>1000000</maxPull> <!-- 1000KW max pull from other batteries. There is infinite input power from other sources, just like with vanilla batteries. -->
<doSelfDischarge>false</doSelfDischarge>
<doInspectorInfo>false</doInspectorInfo>
</li>
Expand Down Expand Up @@ -117,7 +118,7 @@ Firing the beam of energy creates a huge electromagnetic pulse in both the area
<sound>OrbitalBeam</sound>
</li>
<li Class="CompProperties_CameraShaker">
<mag>0.06</mag>
<mag>0.08</mag>
</li>
</comps>
</ThingDef>
Expand Down
16 changes: 8 additions & 8 deletions Defs/Buildings/Turrets/MBD.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<rotatable>false</rotatable>
<size>(3,3)</size>
<statBases>
<MaxHitPoints>900</MaxHitPoints>
<Flammability>0.2</Flammability>
<MaxHitPoints>1000</MaxHitPoints>
<Flammability>0.1</Flammability>
<WorkToBuild>9000</WorkToBuild>
<Mass>220</Mass>
<Beauty>-20</Beauty>
<Beauty>-10</Beauty>
</statBases>
<minifiedDef>MinifiedThing</minifiedDef>
<thingCategories>
Expand Down Expand Up @@ -53,7 +53,7 @@
It's multi-barrel destruction.</description>
<uiIconPath>AntimatterAnnihilation/UI/MBDIcon</uiIconPath>
<statBases>
<ShootingAccuracyTurret>0.985</ShootingAccuracyTurret>
<ShootingAccuracyTurret>0.99</ShootingAccuracyTurret>
</statBases>
<costList>
<Steel>250</Steel>
Expand Down Expand Up @@ -91,7 +91,7 @@ It's multi-barrel destruction.</description>
</comps>
<building>
<turretGunDef>Gun_MBDTurret_AA</turretGunDef>
<turretBurstCooldownTime>5.5</turretBurstCooldownTime>
<turretBurstCooldownTime>5</turretBurstCooldownTime>
</building>
<researchPrerequisites>
<li>R_MBD_AA</li>
Expand All @@ -107,7 +107,7 @@ It's multi-barrel destruction.</description>
</graphicData>
<projectile>
<damageDef>Annihilate_AA</damageDef>
<damageAmountBase>8</damageAmountBase>
<damageAmountBase>10</damageAmountBase>
<speed>200</speed> <!-- Speedy boy. -->
<armorPenetrationBase>1.5</armorPenetrationBase>
</projectile>
Expand All @@ -125,8 +125,8 @@ It's multi-barrel destruction.</description>
<statBases>
<AccuracyTouch>0.45</AccuracyTouch>
<AccuracyShort>0.65</AccuracyShort>
<AccuracyMedium>0.8</AccuracyMedium>
<AccuracyLong>0.75</AccuracyLong>
<AccuracyMedium>0.85</AccuracyMedium>
<AccuracyLong>0.80</AccuracyLong>
<DeteriorationRate>0</DeteriorationRate>
<Mass>200</Mass>
<Flammability>0</Flammability>
Expand Down
14 changes: 7 additions & 7 deletions Defs/Buildings/Turrets/ThunderGun.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
</comps>
<building>
<turretGunDef>Gun_ThunderGunTurret_AA</turretGunDef>
<turretBurstCooldownTime>8</turretBurstCooldownTime>
<turretBurstCooldownTime>7</turretBurstCooldownTime>
</building>
<researchPrerequisites>
<li>ThunderGun_AA</li>
Expand All @@ -105,7 +105,7 @@
</graphicData>
<projectile>
<damageDef>Bullet</damageDef>
<damageAmountBase>25</damageAmountBase>
<damageAmountBase>20</damageAmountBase>
<speed>140</speed>
<armorPenetrationBase>0.65</armorPenetrationBase>
</projectile>
Expand All @@ -121,11 +121,11 @@
<drawSize>(2,2)</drawSize>
</graphicData>
<statBases>
<AccuracyTouch>0.3</AccuracyTouch>
<AccuracyTouch>0.35</AccuracyTouch>
<AccuracyShort>0.75</AccuracyShort>
<AccuracyMedium>0.85</AccuracyMedium>
<AccuracyMedium>0.8</AccuracyMedium>
<AccuracyLong>0.6</AccuracyLong>
<RangedWeapon_Cooldown>3.5</RangedWeapon_Cooldown>
<RangedWeapon_Cooldown>4</RangedWeapon_Cooldown>
<DeteriorationRate>0</DeteriorationRate>
<Mass>200</Mass>
<Flammability>0</Flammability>
Expand All @@ -137,8 +137,8 @@
<warmupTime>0</warmupTime>
<minRange>6</minRange>
<range>55</range>
<ticksBetweenBurstShots>16</ticksBetweenBurstShots>
<burstShotCount>4</burstShotCount>
<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
<burstShotCount>6</burstShotCount>
<soundCast>Shot_Autocannon</soundCast>
<soundCastTail>GunTail_Heavy</soundCastTail>
<muzzleFlashScale>12</muzzleFlashScale>
Expand Down
46 changes: 46 additions & 0 deletions Defs/Damage/Damage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ The flesh is literally annihilated, leaving nothing behind but a gruesome wound.
<defaultArmorPenetration>90</defaultArmorPenetration>
</DamageDef>

<DamageDef>
<defName>SkyBeamBlast_AA</defName>
<label>Energy Blast</label>
<workerClass>AntimatterAnnihilation.Damage.DamageWorker_Annihilate</workerClass> <!-- Just applies to random exterior body part. -->
<hasForcefulImpact>true</hasForcefulImpact>
<externalViolence>true</externalViolence>
<makesBlood>true</makesBlood>
<deathMessage>{0} was killed by an energy blast.</deathMessage>
<hediff>EnergyBlastInjury_AA</hediff>
<armorCategory>Sharp</armorCategory>
<defaultDamage>12</defaultDamage>
<defaultArmorPenetration>90</defaultArmorPenetration>
</DamageDef>

<HediffDef ParentName="InjuryBase">
<defName>EnergyBurnInjury_AA</defName>
<label>Energy Burn</label>
Expand Down Expand Up @@ -93,6 +107,38 @@ Does not bleed as the flesh is forcefully cauterized. Causes intense pain.</desc
</injuryProps>
</HediffDef>

<HediffDef ParentName="InjuryBase">
<defName>EnergyBlastInjury_AA</defName>
<label>Energy Blast</label>
<labelNoun>an energy blast injury</labelNoun>
<description>An energy blast injury, caused by being hit with an intense blast of pure energy.
Does not bleed as the flesh is forcefully cauterized. Causes intense pain.</description>
<comps>
<li Class="HediffCompProperties_TendDuration">
<labelTendedWell>bandaged</labelTendedWell>
<labelTendedWellInner>sutured</labelTendedWellInner>
<labelSolidTendedWell>set</labelSolidTendedWell>
<tendAllAtOnce>false</tendAllAtOnce>
</li>
<li Class="HediffCompProperties_Infecter">
<infectionChance>0.40</infectionChance>
</li>
<li Class="HediffCompProperties_GetsPermanent">
<permanentLabel>Energy Blast Scar</permanentLabel>
</li>
</comps>
<tendable>true</tendable>
<displayWound>true</displayWound>
<injuryProps>
<painPerSeverity>0.025</painPerSeverity>
<averagePainPerSeverityPermanent>0.0035</averagePainPerSeverityPermanent>
<canMerge>false</canMerge>
<destroyedLabel>Burned Off</destroyedLabel>
<destroyedOutLabel>Burned Out</destroyedOutLabel>
<bleedRate>0</bleedRate>
</injuryProps>
</HediffDef>

<DamageDef Name="AnnihilationExplosion_AA">
<defName>AnnihilationExplosion_AA</defName>
<label>annihilation explosion</label>
Expand Down
10 changes: 5 additions & 5 deletions Source/AntimatterAnnihilation/Attacks/CustomOrbitalStrike.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public class CustomOrbitalStrike : OrbitalStrike
public event Action<CustomOrbitalStrike> OnStrikeOver;
public float Radius = 15f;
public int UpdatesPerTick = 4;
public float ArmorPen = 0.35f;
public DamageDef DamageDef;
public IntRange DamageAmountRange = new IntRange(65, 100);
public IntRange CorpseDamageAmountRange = new IntRange(5, 10);
public float ArmorPen = 0.75f;
public DamageDef[] DamageDefs;
public IntRange DamageAmountRange = new IntRange(70, 85);
public IntRange CorpseDamageAmountRange = new IntRange(3, 6);

public override void StartStrike()
{
Expand Down Expand Up @@ -91,7 +91,7 @@ where x.InBounds(base.Map)
log = new BattleLogEntry_DamageTaken(pawn, RulePackDefOf.DamageEvent_PowerBeam, this.instigator as Pawn);
Find.BattleLog.Add(log);
}
tmpThings[i].TakeDamage(new DamageInfo(DamageDef, (float)damage, ArmorPen, -1f, this.instigator, null, this.weaponDef, DamageInfo.SourceCategory.ThingOrUnknown, null)).AssociateWithLog(log);
tmpThings[i].TakeDamage(new DamageInfo(DamageDefs.RandomElement(), (float)damage, ArmorPen, -1f, this.instigator, null, this.weaponDef, DamageInfo.SourceCategory.ThingOrUnknown, null)).AssociateWithLog(log);
}
tmpThings.Clear();
}
Expand Down
8 changes: 4 additions & 4 deletions Source/AntimatterAnnihilation/Buildings/Building_Megumin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ public class Building_Megumin : Building, IConditionalGlower
[TweakValue("AntimatterAnnihilation")]
public static bool DoSolarFlare = true;
[TweakValue("AntimatterAnnihilation", 0f, 1f)]
public static float EasterEggChance = 0.2f;
public static float EasterEggChance = 0.333f;
public static int COOLDOWN_TICKS = 2500 * 24 * 4; // 4 in-game days.
public static int POWER_UP_TICKS = 1276; // Made to correspond to audio queue.
public static int TICKS_BEFORE_FIRING_LASER = 1200; // Made to correspond to audio queue.
public static float RADIUS = 15;
public static float RADIUS = 16;
public static int DURATION_TICKS = 310;
public static float EXPLOSION_RADIUS = 18;
public static int EXPLOSION_DAMAGE = 50;
public static float EXPLOSION_PEN = 0.7f;
public static float CHARGE_WATT_DAYS = 600 * 5; // Requires 5 fully-powered batteries to charge (semi-instantly). Otherwise it will take longer depending on power production.
public static int WORLD_MAP_RANGE = 130;
public static float CHARGE_WATT_DAYS = 600 * 1f; // Requires 1 fully-powered batteries to charge (semi-instantly). Otherwise it will take longer depending on power production.
public static int WORLD_MAP_RANGE = 150;

public bool ShouldBeGlowingNow
{
Expand Down
1 change: 1 addition & 0 deletions Source/AntimatterAnnihilation/Utils/AADefOf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ static AADefOf()

public static DamageDef Annihilate_AA;
public static DamageDef EnergyBurn_AA;
public static DamageDef SkyBeamBlast_AA; // Same as EnergyBurn_AA except that it uses sharp armor.
public static DamageDef AnnihilationExplosion_AA;
public static DamageDef AnnihilationExplosionRailgun_AA;

Expand Down
10 changes: 5 additions & 5 deletions Source/AntimatterAnnihilation/Verbs/Verb_Megumin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ protected override bool TryCastShot()
beam.duration = Building_Megumin.DURATION_TICKS;
beam.instigator = this.caster;
beam.weaponDef = ((base.EquipmentSource != null) ? base.EquipmentSource.def : null);
beam.DamageDef = AADefOf.EnergyBurn_AA;
beam.UpdatesPerTick = 18;
beam.ArmorPen = 0.95f; // To make it viable against mechanoids, who have 200% heat armour.
beam.DamageAmountRange = new IntRange(35, 39); // Applied up to 18 times per tick, that's a lot of damage.
beam.CorpseDamageAmountRange = new IntRange(10, 15); // Does less damage to corpses, so that there is something left over after the devastation, although this may be OP (killing entire army and keeping their gear).
beam.DamageDefs = new DamageDef[]{ AADefOf.SkyBeamBlast_AA, AADefOf.EnergyBurn_AA };
beam.UpdatesPerTick = 20;
beam.ArmorPen = 1.3f; // To make it viable against mechanoids and heavy raiders.
beam.DamageAmountRange = new IntRange(35, 45); // Applied up to 18 times per tick, that's a lot of damage.
beam.CorpseDamageAmountRange = new IntRange(3, 6); // Does less damage to corpses, so that there is something left over after the devastation, although this may be OP (killing entire army and keeping their gear).
beam.StartStrike();

// Spawn huge explosion once the beam fires.
Expand Down

0 comments on commit 15cef5f

Please sign in to comment.