Changeset cebb7b381e718b279c1dd4c9b938081350f6aeb2
- Timestamp:
- 05/12/08 16:22:24
(2 months ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1210602144 +0200
- git-parent:
[9fc4d8797d8b9f3e36c7d5871eda34d7fa44f1f4]
- git-author:
- Simon Dietsch <rhonabwy@sternenbund.org> 1210602144 +0200
- Message:
[gameplay] Globales Flag fuer Munition eingefuehrt. Schaden wird durch Panzerung dividiert, wenn Flag gesetzt ist. Ammo Table bit-flag (2)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| refe20b3 |
rcebb7b3 |
|
| 64 | 64 | * Area-Damage ueber die Distanz nicht reduzieren |
|---|
| 65 | 65 | */ |
|---|
| 66 | | AD_FULL(1); |
|---|
| | 66 | AD_FULL(1), |
|---|
| | 67 | |
|---|
| | 68 | /** |
|---|
| | 69 | * Schaden der Munition wird durch Panzerung dividiert |
|---|
| | 70 | */ |
|---|
| | 71 | ARMOR_REDUX(2); |
|---|
| 67 | 72 | |
|---|
| 68 | 73 | private int bit; |
|---|
| r055387c |
rcebb7b3 |
|
| 388 | 388 | battle.logenemy("\n"+prefix+":\n"); |
|---|
| 389 | 389 | } |
|---|
| | 390 | |
|---|
| | 391 | if(this.weapon.getAmmoType().length != 0){ |
|---|
| | 392 | if ( this.localweapon.get("armor_redux") != null){ |
|---|
| | 393 | schaden = (int)Math.round(schaden/this.getPanzerung(eShip, eShipType)); |
|---|
| | 394 | |
|---|
| | 395 | } |
|---|
| | 396 | } |
|---|
| | 397 | |
|---|
| | 398 | |
|---|
| 390 | 399 | |
|---|
| 391 | 400 | if( (hit != 0) && (eShip.getShields() > 0) ) { |
|---|
| … | … | |
| 595 | 604 | } |
|---|
| 596 | 605 | |
|---|
| | 606 | private int getPanzerung(BattleShip ship, ShipTypeData shipType) { |
|---|
| | 607 | return (int)Math.round(shipType.getPanzerung()*ship.getShip().getHull()/(double)shipType.getHull()); |
|---|
| | 608 | } |
|---|
| | 609 | |
|---|
| | 610 | |
|---|
| 597 | 611 | private SQLResultRow getWeaponData( Battle battle ) { |
|---|
| 598 | 612 | ShipTypeData ownShipType = this.ownShip.getTypeData(); |
|---|
| … | … | |
| 723 | 737 | localweapon.put("ammoitem", ammoitem); |
|---|
| 724 | 738 | localweapon.put("ad_full", ammo.hasFlag(Ammo.Flags.AD_FULL)); |
|---|
| | 739 | localweapon.put("armor_redux", ammo.hasFlag(Ammo.Flags.ARMOR_REDUX)); |
|---|
| 725 | 740 | localweapon.put("long_range", this.weapon.hasFlag(Weapon.Flags.LONG_RANGE)); |
|---|
| 726 | 741 | localweapon.put("very_long_range", this.weapon.hasFlag(Weapon.Flags.VERY_LONG_RANGE)); |
|---|
| … | … | |
| 911 | 926 | |
|---|
| 912 | 927 | if( this.localweapon.getInt("subdamage") > 0 ) { |
|---|
| 913 | | int tmppanzerung = (int)Math.round(aeShipType.getPanzerung()*aeShip.getShip().getHull()/(double)aeShipType.getHull()); |
|---|
| 914 | | |
|---|
| | 928 | int tmppanzerung = this.getPanzerung(aeShip, aeShipType); |
|---|
| | 929 | |
|---|
| 915 | 930 | Offizier eOffizier = Offizier.getOffizierByDest('s', aeShip.getId()); |
|---|
| 916 | 931 | int defensivskill = this.getDefensivSkill( aeShipType, eOffizier ); |
|---|
| … | … | |
| 1219 | 1234 | int shieldSchaden = this.getDamage(this.localweapon.getInt("shielddamage"), offensivskill, enemyShipType); |
|---|
| 1220 | 1235 | |
|---|
| 1221 | | int panzerung = (int)Math.round(enemyShipType.getPanzerung()*this.enemyShip.getShip().getHull()/(double)enemyShipType.getHull()); |
|---|
| | 1236 | int panzerung = this.getPanzerung(enemyShip, enemyShipType); |
|---|
| 1222 | 1237 | int schaden = absSchaden; |
|---|
| 1223 | 1238 | |
|---|