📄 ammotype.java
字号:
munitions.addElement( new MunitionMutator( "Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Acid", 1, M_AX_HEAD, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = srmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for Clan SRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "(Clan) Inferno", 1, M_INFERNO, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Narc-capable", 1, M_NARC_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Artemis-capable", 1, M_ARTEMIS_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "(Clan) Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "(Clan) Acid", 1, M_AX_HEAD, TechConstants.T_CLAN_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanSrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for IS LRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Flare", 1, M_FLARE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder", 1, M_THUNDER, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Augmented", 2, M_THUNDER_AUGMENTED, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Inferno", 2, M_THUNDER_INFERNO, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Active", 2, M_THUNDER_ACTIVE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Vibrabomb", 2, M_THUNDER_VIBRABOMB, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Narc-capable", 1, M_NARC_CAPABLE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Artemis-capable", 1, M_ARTEMIS_CAPABLE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Semi-guided", 1, M_SEMIGUIDED, TechConstants.T_IS_LEVEL_2) ); munitions.addElement( new MunitionMutator( "Swarm", 1, M_SWARM, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Swarm-I", 1, M_SWARM_I, TechConstants.T_IS_LEVEL_2) ); munitions.addElement( new MunitionMutator( "Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = lrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for Clan LRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "(Clan) Flare", 1, M_FLARE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Thunder", 1, M_THUNDER, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Thunder-Augmented", 2, M_THUNDER_AUGMENTED, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Thunder-Inferno", 2, M_THUNDER_INFERNO, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Thunder-Active", 2, M_THUNDER_ACTIVE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Thunder-Vibrabomb", 2, M_THUNDER_VIBRABOMB, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Narc-capable", 1, M_NARC_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Artemis-capable", 1, M_ARTEMIS_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Semi-guided", 1, M_SEMIGUIDED, TechConstants.T_CLAN_LEVEL_2) ); munitions.addElement( new MunitionMutator( "(Clan) Swarm", 1, M_SWARM, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Swarm-I", 1, M_SWARM_I, TechConstants.T_CLAN_LEVEL_2) ); munitions.addElement( new MunitionMutator( "(Clan) Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "(Clan) Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_CLAN_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanLrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for AC rounds. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Precision", 2, M_PRECISION, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Armor-Piercing", 2, M_ARMOR_PIERCING, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Flechette", 1, M_FLECHETTE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Incendiary", 1, M_INCENDIARY_AC, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Tracer", 1, M_TRACER, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = acAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for IS Arrow IV launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Homing", 1, M_HOMING, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "FASCAM", 1, M_FASCAM, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Inferno-IV", 1, M_INFERNO_IV, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Vibrabomb-IV", 1, M_VIBRABOMB_IV, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Illumination", 1, M_FLARE, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Cluster", 1, M_CLUSTER, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Davy Crockett-M", 5, M_DAVY_CROCKETT_M, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = arrowAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for clan Arrow IV launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Homing", 1, M_HOMING, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "FASCAM", 1, M_FASCAM, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Inferno-IV", 1, M_INFERNO_IV, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Vibrabomb-IV", 1, M_VIBRABOMB_IV, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Davy Crockett-M", 5, M_DAVY_CROCKETT_M, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Illumination", 1, M_FLARE, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Cluster", 1, M_CLUSTER, TechConstants.T_CLAN_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanArrowAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for Artillery launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Smoke", 1, M_SMOKE, TechConstants.T_IS_LEVEL_2 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = thumperAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // extra level 3 ammo for sniper & long tom but not thumper munitions.addElement( new MunitionMutator( "Copperhead", 1, M_HOMING, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Illumination", 1, M_FLARE, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Cluster", 1, M_CLUSTER, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Flechette", 1, M_FLECHETTE, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = artyAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Make Davy Crockett-Ms for Long Toms, but not Thumper or Sniper. base = createISLongTomAmmo(); mutator = new MunitionMutator( "Davy Crockett-M", 5, M_DAVY_CROCKETT_M, TechConstants.T_IS_LEVEL_3 ); EquipmentType.addType( mutator.createMunitionType( base ) ); // Create the munition types for Clan Artillery launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "(Clan) Smoke", 1, M_SMOKE, TechConstants.T_CLAN_LEVEL_2 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanArtyAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // cache types that share a launcher for loadout purposes for (Enumeration e = EquipmentType.getAllTypes(); e.hasMoreElements(); ) { EquipmentType et = (EquipmentType)e.nextElement(); if (! (et instanceof AmmoType)) { continue; } AmmoType at = (AmmoType)et; int nType = at.getAmmoType(); if (m_vaMunitions[nType] == null) { m_vaMunitions[nType] = new Vector(); } m_vaMunitions[nType].addElement(at); } } public static AmmoType createISAC2Ammo() { AmmoType ammo = new AmmoType(); ammo.techLevel = TechConstants.T_IS_LEVEL_1; ammo.name = "AC/2 Ammo"; ammo.setInternalName("IS Ammo AC/2"); ammo.addLookupName("ISAC2 Ammo"); ammo.addLookupName("IS Autocannon/2 Ammo"); ammo.damagePerShot = 1; ammo.rackSize = 2; ammo.ammoType = AmmoType.T_AC; ammo.shots = 45; ammo.bv = 5; ammo.cost = 1000; return ammo; } public static AmmoType createISAC5Ammo() {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -