Skip to content

Commit

Permalink
Merge pull request #5919 from repligator/Tests
Browse files Browse the repository at this point in the history
A simple test that checks canonicity is working as intended
  • Loading branch information
IllianiCBT authored Aug 18, 2024
2 parents e3f92cc + 9ad3a71 commit 29fdef4
Show file tree
Hide file tree
Showing 3 changed files with 291 additions and 2 deletions.
175 changes: 175 additions & 0 deletions megamek/testresources/megamek/common/units/Exterminator EXT-4A.mtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
chassis:Exterminator
model:EXT-4A
mul id:4147
Config:Biped
techbase:Inner Sphere
era:3007
source:TRO: 3050
rules level:1
role:Skirmisher



quirk:difficult_maintain


mass:65
engine:325 Fusion Engine(IS)
structure:IS Standard
myomer:Standard

heat sinks:10 Single
walk mp:5
jump mp:5

armor:Standard(Inner Sphere)
LA armor:19
RA armor:19
LT armor:22
RT armor:22
CT armor:23
HD armor:9
LL armor:19
RL armor:19
RTL armor:8
RTR armor:8
RTC armor:8

Weapons:7
Medium Laser, Left Arm
Medium Laser, Left Arm
Medium Laser, Right Arm
Medium Laser, Right Arm
LRM 10, Left Torso
Machine Gun, Right Torso
Small Laser, Head

Left Arm:
Shoulder
Upper Arm Actuator
Lower Arm Actuator
Hand Actuator
Medium Laser
Medium Laser
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-

Right Arm:
Shoulder
Upper Arm Actuator
Lower Arm Actuator
Hand Actuator
Medium Laser
Medium Laser
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-

Left Torso:
Jump Jet
Jump Jet
LRM 10
LRM 10
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-

Right Torso:
Jump Jet
Jump Jet
Machine Gun
IS Ammo MG - Full
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-

Center Torso:
Fusion Engine
Fusion Engine
Fusion Engine
Gyro
Gyro
Gyro
Gyro
Fusion Engine
Fusion Engine
Fusion Engine
Jump Jet
IS Ammo LRM-10

Head:
Life Support
Sensors
Cockpit
Small Laser
Sensors
Life Support
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-

Left Leg:
Hip
Upper Leg Actuator
Lower Leg Actuator
Foot Actuator
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-

Right Leg:
Hip
Upper Leg Actuator
Lower Leg Actuator
Foot Actuator
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-
-Empty-

overview:The Exterminator is a BattleMech that was designed in 2630 for the most dubious, but necessary, of purposes: Head Hunting.

capabilities:The weapons used by the Exterminator are not nearly as unique or high tech as the electronics on board. The primary weapons of the Exterminator are medium weight lasers, two in each arm. For long range engagements, the 'Mech also carries a missile launcher with one ton of reloads in the center torso. These weapons are backed up by a short range laser mounted in the head for when engagements close to point blank range, and, for defense against missile attacks, the Exterminator has an Anti-Missile System in the right torso with one ton of ammo.

deployment:The 4A is what became of the Exterminator during the Succession Wars, revived by Kallon Industries when they came across blueprints for the design in 3007. The resulting 'Mech resembles the Exterminator outwardly and carries an almost identical weapons load but otherwise is not the same machine. The only weapons change is the use of an M100 heavy machine gun with a half-ton of ammo in place of the anti-missile system. A smaller VOX 325 standard fusion engine reduces its top speed by about 10 km/h. The armor is still identical to that of the original Exterminator, but unfortunately the Null-Signature System could not be saved. This version also made use of a Tek BattleCom communication system and Tek LOR T13d targeting system.

history:The Exterminator was outfitted with a special Null-Signature System, heat baffles and, in some cases, a Chameleon Light Polarization Shield. These advanced systems allowed it to easily infiltrate enemy lines. Once the Exterminator breached the enemy's rear, its mission was to find and destroy as much of the enemy's command structure as possible. This mission profile included attacking mobile headquarters, field bases and command level officers. Rather than be part of the standard formation, Exterminators were attached to a regimental or higher headquarters unit, often as a fifth member of the command lance itself, before being assigned to individual units. A regiment was considered lucky to have more than one Exterminator, and it was not unusual for its parent unit to pull all assigned Exterminators and pool them for a specific mission. It was widely believed that the Exterminator had not survived the fighting of the First Succession War as there were lances whose sole mission was to hunt down and destroy this type of 'Mech (coupled with the destruction of General Systems' primary factory on Caph in 2793). In 3007, Kallon Industries (Thermopolis, Free Worlds League), looking for a replacement for their aging Wolverine, recovered blueprints for the Exterminator and immediately modified the design so that it could be built using the technology readily available. The result was a BattleMech not only far less effective than the original, but below the capabilities of even the Wolverine it was meant to replace. Only twenty-five of these Exterminators were produced and none survived past the Fourth Succession War, making the design effectively extinct in the Inner Sphere. Only later was it revealed that the Exterminator still existed in ComStar's private army, the Com Guards, although even here few were of the hyper-advanced stealth models, and while the Exterminator was retained by the Clans its decidedly "dishonorable" method of fighting meant few were used. ComStar continued to produce variants which took advantage of recovered lostech, and the design was used by the Word of Blake during the Jihad.

manufacturer:Kallon Weapon Industries
primaryfactory:Thermopolis
systemmanufacturer:CHASSIS:SL Special
systemmanufacturer:ENGINE:Magna 390 XL
systemmanufacturer:ARMOR:Fibrolyte Armorscale
systemmanufacturer:JUMPJET:Chevron II
systemmanufacturer:COMMUNICATIONS:Tek BattleCom
systemmanufacturer:TARGETING:Tek LOR T13d

Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#building block data file
<BlockVersion>
1
</BlockVersion>

# Write the version number just in case...
<Version>
MAM0
</Version>

<UnitType>
Tank
</UnitType>

<Name>
Kanga Medium Hovertank
</Name>

<model>

</model>

<mul id:>
1745
</mul id:>

<year>
2653
</year>

<type>
IS Level 2
</type>

<role>
Striker
</role>

<motion_type>
Hover
</motion_type>

<cruiseMP>
8
</cruiseMP>

<jumpMP>
6
</jumpMP>

<engine_type>
1
</engine_type>

<armor>
20
12
12
12
</armor>

<Body Equipment>
IS Ammo AC/5
IS Ammo LRM-10
IS Ammo SRM-4
IS Machine Gun Ammo - Half
VehicleJumpJet
VehicleJumpJet
VehicleJumpJet
VehicleJumpJet
VehicleJumpJet
VehicleJumpJet
</Body Equipment>

<Front Equipment>
Autocannon/5
LRM 10
SRM 4
Machine Gun
</Front Equipment>

<Right Equipment>
</Right Equipment>

<Left Equipment>
</Left Equipment>

<Rear Equipment>
</Rear Equipment>

<source>
TRO: 3050
</source>

<tonnage>
50.0
</tonnage>
21 changes: 19 additions & 2 deletions megamek/unittests/megamek/common/EntityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void testCalculateWeight() {

// Test 1/1
try {
f = new File("data/mechfiles/mechs/3050U/Exterminator EXT-4A.mtf");
f = new File("testresources/megamek/common/units/Exterminator EXT-4A.mtf");
mfp = new MechFileParser(f);
e = mfp.getEntity();
expectedWeight = 65;
Expand All @@ -105,6 +105,23 @@ public void testCalculateWeight() {
}
}

@Test
public void testCanon() {
File f;
MechFileParser mfp;
Entity e;

// Test 1/1
try {
f = new File("testresources/megamek/common/units/Exterminator EXT-4A.mtf");
mfp = new MechFileParser(f);
e = mfp.getEntity();
assertEquals(e.isCanon(), true);
} catch (Exception ex) {
fail(ex.getMessage());
}
}

/**
* Verify new Tank method .isImmobilizedForJump() returns correct values in
* various states. Note: vehicles cannot lose individual Jump Jets via crits,
Expand All @@ -118,7 +135,7 @@ public void testIsImmobilizedForJump() {

// Test 1/1
try {
f = new File("data/mechfiles/vehicles/3050U/Kanga Medium Hovertank.blk");
f = new File("testresources/megamek/common/units/Kanga Medium Hovertank.blk");
mfp = new MechFileParser(f);
e = mfp.getEntity();
Tank t = (Tank) e;
Expand Down

0 comments on commit 29fdef4

Please sign in to comment.