Changeset 390f9f11c7479698e59748f483bde407a806cace

Show
Ignore:
Timestamp:
09/23/07 18:44:15 (1 year ago)
Author:
Christopher Jung <bktheg@web.de>
git-committer:
Christopher Jung <bktheg@web.de> 1190565855 +0200
git-parent:

[fc42460aa180429c80c001911fa4703883a998c1]

git-author:
Simon Dietsch <rhonabwy@arcor.de> 1190565855 +0200
Message:

Marines

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • db/tables/bases.sql

    r4e34802 r390f9f1  
    2424  `autogtuacts` text NOT NULL default '', 
    2525  `version` int(11) NOT NULL default '0', 
     26  `marines` int unsigned NOT NULL default '0', 
    2627  PRIMARY KEY  (`id`), 
    2728  KEY `owner` (`owner`,`id`), 
  • db/tables/ship_types.sql

    r870bccb r390f9f1  
    3737  `hide` tinyint(1) NOT NULL default '0', 
    3838  `srs` tinyint NOT NULL default '1', 
    39   `ship_types` ADD `scanCost` INT NOT NULL default '0', 
    40   `ship_types` ADD `pickingCost` INT NOT NULL default '0', 
     39  `scanCost` INT NOT NULL default '0', 
     40  `pickingCost` INT NOT NULL default '0', 
     41  `marines` int unsigned NOT NULL default '0', 
    4142  PRIMARY KEY  (`id`) 
    4243) ENGINE=InnoDB DEFAULT CHARSET=utf8;  
  • db/tables/ships.sql

    r2193fdb r390f9f1  
    4141  `respawn` tinyint(4) default NULL, 
    4242  `startFighters` tinyint(3) unsigned NOT NULL default '1', 
     43  `marines` int unsigned NOT NULL default '0', 
    4344  PRIMARY KEY  (`id`), 
    4445  KEY `coords` (`x`,`y`,`system`), 
  • db/tables/ships_modules.sql

    r870bccb r390f9f1  
    3434  `scanCost` INT NOT NULL DEFAULT '0', 
    3535  `pickingCost` INT NOT NULL DEFAULT '0', 
     36  `marines` int unsigned NOT NULL default '0', 
    3637  PRIMARY KEY  (`id`) 
    3738) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='modifizierte Schiffstypenwerte fuer "jedes" Schiff';  
  • db/updates.xml

    r870bccb r390f9f1  
    406406                ALTER TABLE `ship_types` ADD `pickingCost` INT NOT NULL ; 
    407407        ]]></update> 
     408        <update type="structure" datum="2007-09-23"><![CDATA[ 
     409                alter table `bases` add `marines` int unsigned not null default '0'; 
     410                alter table `ships` add `marines` int unsigned not null default '0'; 
     411                alter table `ship_types` add `marines` int unsigned not null default '0'; 
     412                alter table `ships_modules` add `marines` int unsigned not null default '0'; 
     413        ]]></update> 
    408414</updates> 
  • src/net/driftingsouls/ds2/server/bases/Base.java

    refe50c3 r390f9f1  
    7474        private int system; 
    7575        private int bewohner; 
     76        private int marines; 
    7677        private int arbeiter; 
    7778        @Column(name="e") 
     
    393394        public void setBewohner(int bewohner) { 
    394395                this.bewohner = bewohner; 
     396        } 
     397         
     398        public int getMarines() { 
     399                return this.marines; 
     400        } 
     401         
     402        public void setMarines(int marines){ 
     403                this.marines = marines; 
    395404        } 
    396405         
  • src/net/driftingsouls/ds2/server/battles/BattleShip.java

    rdf3f9e5 r390f9f1  
    293293                return ship.getCrew(); 
    294294        } 
     295         
     296        /** 
     297         * Gibt die Marineanzahl auf dem Schiff zurueck 
     298         * @return Die Marineanzahl 
     299         * @see net.driftingsouls.ds2.server.ships.Ship#getMarines() 
     300         */ 
     301        public int getMarines() { 
     302                return ship.getMarines(); 
     303        } 
    295304 
    296305        /** 
  • src/net/driftingsouls/ds2/server/modules/AngriffController.java

    r7375108 r390f9f1  
    190190                                        "shipinfo.type.maxenergy",      shipType.getEps(), 
    191191                                        "shipinfo.type.maxcrew",        shipType.getCrew(), 
     192                                        "shipinfo.type.maxmarines",     shipType.getMarines(), 
    192193                                        "shipinfo.type.weapons",        shipType.isMilitary(), 
    193194                                        "shipinfo.hull",                        Common.ln(ship.getShip().getHull()), 
     
    199200                                        "shipinfo.energy",                      ship.getShip().getEnergy(), 
    200201                                        "shipinfo.crew",                        ship.getShip().getCrew(), 
     202                                        "shipinfo.marines",                     ship.getShip().getMarines(), 
    201203                                        "shipinfo.engine",                      ship.getShip().getEngine(), 
    202204                                        "shipinfo.weapons",                     ship.getShip().getWeapons(), 
  • src/net/driftingsouls/ds2/server/modules/CrewtauschController.java

    r7375108 r390f9f1  
    5050                public int getCrew(); 
    5151                /** 
     52                 * * Gibt die verfuegbaren Marines zurueck 
     53                 * @return Die Marines 
     54                 */ 
     55                public int getMarines(); 
     56                /** 
    5257                 * Setzt die Crew auf dem Objekt 
    5358                 * @param crew Die Crew 
     
    5560                public void setCrew(int crew); 
    5661                /** 
     62                 * * Setzt die Marines auf dem Objekt 
     63                 * @param marines Die Marines 
     64                 */ 
     65                public void setMarines(int marines); 
     66                /** 
    5767                 * Wird am Ende des Transfervorgangs aufgerufen 
    5868                 * 
     
    7989                 */ 
    8090                public int getMaxCrew(); 
     91                /** 
     92                 * Gibt die maximale Anzahl an Marines auf dem Objekt zurueck 
     93                 * @return Die maximale Menge Marines (<code>-1</code> = unbegrenzt) 
     94                 */ 
     95                public int getMaxMarines(); 
    8196        } 
    8297         
     
    99114                        return ship.getCrew(); 
    100115                } 
     116                                 
     117                public int getMarines() { 
     118                        return ship.getMarines(); 
     119                } 
    101120 
    102121                public int getId() { 
     
    111130                        ship.setCrew(crew); 
    112131                } 
     132                 
     133                public void setMarines(int marines) { 
     134                        ship.setMarines(marines); 
     135                } 
    113136 
    114137                public int getMaxCrew() { 
    115138                        return ship.getTypeData().getCrew(); 
    116139                } 
    117  
     140                 
     141                public int getMaxMarines() { 
     142                        return ship.getTypeData().getMarines(); 
     143                } 
     144                 
    118145                public User getOwner() { 
    119146                        return ship.getOwner(); 
     
    158185                public User getOwner() { 
    159186                        return base.getOwner(); 
     187                } 
     188 
     189                public int getMarines() { 
     190                        return base.getMarines(); 
     191                } 
     192 
     193                public int getMaxMarines() { 
     194                        return -1; 
     195                } 
     196 
     197                public void setMarines(int marines) { 
     198                        base.setMarines(marines); 
    160199                } 
    161200        } 
     
    164203        private Target datat = null; 
    165204        private int maxcrewf; 
     205        private int maxmarines; 
    166206         
    167207        /** 
     
    197237                Target datat = null; 
    198238                int maxcrewf = 0; 
     239                int maxmarines = 0; 
    199240                 
    200241                if( mode.equals("ss") ) { 
     
    208249 
    209250                        maxcrewf = ship.getTypeData().getCrew(); 
     251                        maxmarines = ship.getTypeData().getMarines(); 
    210252                        datat = new ShipTarget(aship); 
    211253                } 
     
    220262 
    221263                        maxcrewf = ship.getTypeData().getCrew(); 
     264                        maxmarines = ship.getTypeData().getMarines(); 
    222265                        datat = new BaseTarget(abase); 
    223266                } 
     
    236279                this.datat = datat; 
    237280                this.maxcrewf = maxcrewf; 
     281                this.maxmarines = maxmarines; 
    238282                 
    239283                return true;     
     
    242286        /** 
    243287         * Transferiert Crew vom Ausgangsschiff zum Zielschiff/Basis 
     288         * Transferiert Crew/Marines vom Ausgangsschiff zum Zielschiff/Basis 
    244289         * @urlparam int send Die Anzahl der zu transferierenden Crew 
     290         * @urlparam int sendm Die Anzahl der zu transferierenden Marines 
    245291         * 
    246292         */ 
     
    272318                        ship.recalculateShipStatus(); 
    273319                }        
     320                parameterNumber("sendm"); 
     321                int sendm = getInteger("sendm"); 
     322                if( sendm < 0 ) { 
     323                        sendm = 0; 
     324                } 
     325                if( (datat.getMaxMarines() > -1) && (sendm > datat.getMaxMarines() - datat.getMarines()) ) { 
     326                        sendm = datat.getMaxMarines() - datat.getMarines(); 
     327                } 
     328                if( sendm > ship.getMarines() ) { 
     329                        sendm = ship.getMarines(); 
     330                } 
     331                         
     332                if( sendm > 0 ) { 
     333                        t.setVar(       "marinestausch.transfer",       1, 
     334                                                "transfer.way.to",              1, 
     335                                                "transfer.mcount",              sendm ); 
     336                                 
     337                        ship.setMarines(ship.getMarines()-sendm); 
     338                        datat.setMarines(datat.getMarines()+sendm); 
     339                        datat.finishTransfer(); 
     340                        ship.recalculateShipStatus(); 
     341                } 
    274342                redirect(); 
    275343        } 
     
    277345        /** 
    278346         * Transfer in umgekehrter Richtung.<br> 
    279          * Transferiert Crew vom Zielschiff/Basis zum Ausgangsschiff 
     347         * Transferiert Crew/Marines vom Zielschiff/Basis zum Ausgangsschiff 
    280348         * @urlparam int rec Die Anzahl der zu transferierenden Crew 
     349         * @urlparam int recm Die Anzahl der zu transferierenden Marines 
    281350         * 
    282351         */ 
     
    287356                parameterNumber("rec"); 
    288357                int rec = getInteger("rec"); 
     358                parameterNumber("recm"); 
     359                int recm = getInteger("recm"); 
    289360                 
    290361                if( rec < 0 ) { 
     
    308379                        ship.recalculateShipStatus(); 
    309380                } 
     381                if( recm < 0 ) { 
     382                        recm = 0; 
     383                } 
     384                if( recm > maxmarines - ship.getMarines() ) { 
     385                        recm = maxmarines - ship.getMarines(); 
     386                } 
     387                if( recm > datat.getMarines() ) { 
     388                        recm = datat.getMarines(); 
     389                } 
     390                if( recm > 0 ) { 
     391                        t.setVar(       "marinestausch.transfer",       1, 
     392                                                "transfer.way.to",              0, 
     393                                                "transfer.mcount",              recm ); 
     394                                 
     395                        ship.setMarines(ship.getMarines()+recm); 
     396                        datat.setMarines(datat.getMarines()-recm); 
     397                        datat.finishTransfer(); 
     398                        ship.recalculateShipStatus(); 
     399                } 
    310400                         
    311401                redirect(); 
     
    326416                                        "ship.crew",            ship.getCrew(), 
    327417                                        "ship.maxcrew",         maxcrewf, 
     418                                        "ship.marines",         ship.getMarines(), 
     419                                        "ship.maxmarines",      maxmarines, 
    328420                                        "target.id",            datat.getId(), 
    329421                                        "target.name",          datat.getName(), 
    330422                                        "target.crew",          datat.getCrew(), 
    331423                                        "target.maxcrew",       (datat.getMaxCrew() > -1 ? datat.getMaxCrew() : "&#x221E;"), 
     424                                        "target.marines",       datat.getMarines(), 
     425                                        "target.maxmarines",    (datat.getMaxMarines() > -1 ? datat.getMaxMarines() : "&#x221E;"), 
    332426                                        "global.mode",          mode, 
    333427                                        "global.mode.ss",       mode.equals("ss"), 
  • src/net/driftingsouls/ds2/server/modules/KapernController.java

    r7375108 r390f9f1  
    253253                 
    254254                int acrew = this.ownShip.getCrew(); 
     255                int amarines = this.ownShip.getMarines(); 
    255256                int dcrew = this.targetShip.getCrew(); 
     257                int dmarines = this.targetShip.getMarines(); 
    256258 
    257259                ShipTypeData ownShipType = this.ownShip.getTypeData(); 
     
    263265                 
    264266                // Falls Crew auf dem Zielschiff vorhanden ist 
    265                 if( this.targetShip.getCrew() != 0 ) { 
     267                if( this.targetShip.getCrew() != 0 || this.targetShip.getMarines() != 0) { 
    266268                        if( this.targetShipType.getCrew() == 0 ) { 
    267269                                addError("Dieses Schiff ist nicht kaperbar", errorurl); 
     
    335337         
    336338                        int defmulti = 1; 
     339                        int attmulti = 1; 
    337340                         
    338341                        Offizier offizier = Offizier.getOffizierByDest('s', this.targetShip.getId()); 
     342                        Offizier aoffizier = Offizier.getOffizierByDest('s', this.ownShip.getId()); 
    339343                        if( offizier != null ) { 
    340344                                defmulti = (int)Math.round(offizier.getAbility(Offizier.Ability.SEC)/25d)+1; 
    341345                        } 
    342  
    343                         if( acrew >= dcrew*3*defmulti ) { 
     346                        if(aoffizier != null){ 
     347                                attmulti = (int)Math.round(aoffizier.getAbility(Offizier.Ability.COM)/25d)+1; 
     348                        } 
     349 
     350                        if( amarines*attmulti >= dcrew*3*defmulti + dmarines*3*defmulti) { 
    344351                                ok = true; 
    345352                                 
     
    350357                                //$dcrew = round(($dcrew*$defmulti - $acrew)/$defmulti); 
    351358                                 
    352                                 if( Math.round((dcrew*defmulti - acrew)/defmulti) > 0 ) { 
    353                                         int oldacrew = acrew; 
     359                                if( Math.round(dcrew*defmulti + dmarines*defmulti - amarines*attmulti) > 0 ) { 
     360                                        int oldamarines = amarines; 
     361                                        //int oldacrew = acrew; 
    354362                                        int olddcrew = dcrew; 
    355                                         acrew  = (int)Math.round(acrew * 0.1); 
    356                                         if( acrew < 1 ) { 
    357                                                 acrew = 1; 
     363                                        int olddmarines = dmarines; 
     364                                        amarines = (int)Math.round(amarines * 0.1); 
     365                                        if( amarines < 1 ) { 
     366                                                amarines = 0; 
    358367                                        } 
    359368 
    360                                         dcrew = Math.round((dcrew*defmulti - oldacrew+acrew)/defmulti); 
    361                                          
    362                                         t.setVar("kapern.message", kapermessage+"Der Feind verteidigt das Schiff:<br />"+(oldacrew-acrew)+" Crewmitglieder fallen.<br />"+(olddcrew-dcrew)+" Feinde get&ouml;tet.<br /><br /><span style=\"color:red\">Angriff abgebrochen</span>" ); 
    363                                         msg.append("Ihre Crew verteidigt das Schiff:\n"+(oldacrew-acrew)+" Feinde werden erschossen.\n"+(olddcrew-dcrew)+" Besatzungsmitglieder haben ihr leben gelassen.\n\n[color=green]Der Feind flieht[/color]\n"); 
     369                                        if( Math.round(dmarines*defmulti - oldamarines*attmulti) >= 0){ 
     370                                                dmarines = Math.round(dmarines*defmulti - oldamarines*attmulti); 
     371                                        }else{ 
     372                                                dmarines = 0; 
     373                                                dcrew = Math.round(dcrew*defmulti - (oldamarines*attmulti - dmarines*defmulti)); 
     374                                        } 
     375                                         
     376                                        t.setVar("kapern.message", kapermessage+"Der Feind verteidigt das Schiff:<br />"+(oldamarines-amarines)+" Marines fallen.<br />"+(olddmarines-dmarines)+" Marines und "+(olddcrew-dcrew)+" Besatzungsmitglieder get&ouml;tet.<br /><br /><span style=\"color:red\">Angriff abgebrochen</span>" ); 
     377                                        msg.append("Ihre Crew verteidigt das Schiff:\n"+(oldamarines-amarines)+" Marines werden erschossen.\n"+(olddmarines-dmarines)+" Marines und "+(olddcrew-dcrew)+" Besatzungsmitglieder haben ihr leben gelassen.\n\n[color=green]Der Feind flieht[/color]\n"); 
    364378                                         
    365379                                        ok = false; 
    366380                                }  
    367381                                else { 
    368                                         t.setVar("kapern.message", kapermessage+"Der Feind verteidigt das Schiff:<br />"+Math.round(dcrew*defmulti)+" Crewmitglieder fallen.<br />"+dcrew+" Feinde get&ouml;tet" ); 
    369                                         msg.append("Ihre Crew verteidigt das Schiff:\n"+Math.round(dcrew*defmulti)+" Feinde werden erschossen.\n"+dcrew+" Besatzungsmitglieder haben ihr leben gelassen.\n\n[color=red]Die "+this.targetShip.getName()+" ist verloren[/color]\n"); 
    370                                          
    371                                         acrew -= Math.round(dcrew*defmulti); 
     382                                        int oldamarines = amarines; 
     383                                        int olddcrew = dcrew; 
     384                                        int olddmarines = dmarines; 
     385                                        amarines = Math.round(amarines*attmulti - (dcrew*defmulti + dmarines*defmulti)); 
     386 
    372387                                        dcrew = 0; 
     388                                        dmarines = 0; 
     389                                         
     390                                        t.setVar("kapern.message", kapermessage+"Der Feind verteidigt das Schiff:<br />"+(oldamarines-amarines)+" Marines fallen.<br />"+(olddmarines-dmarines)+" Marines und "+(olddcrew-dcrew)+" Besatzungsmitglieder get&ouml;tet" ); 
     391                                        msg.append("Ihre Crew verteidigt das Schiff:\n"+(oldamarines-amarines)+" Marines werden erschossen.\n"+Math.round(dcrew*defmulti)+" Feinde Besatzungsmitglieder haben ihr leben gelassen.\n\n[color=red]Die "+this.targetShip.getName()+" ist verloren[/color]\n"); 
     392                                                                                 
    373393                                        ok = true; 
    374394                                } 
     
    391411                 
    392412                this.ownShip.setCrew(acrew); 
     413                this.ownShip.setMarines(amarines); 
    393414                this.targetShip.setCrew(dcrew); 
     415                this.targetShip.setMarines(dmarines); 
    394416                 
    395417                // Wurde das Schiff gekapert? 
  • src/net/driftingsouls/ds2/server/modules/SchiffController.java

    rb035981 r390f9f1  
    12371237                                        "ship.sensors",                 ship.getSensors(), 
    12381238                                        "shiptype.crew",                Common.ln(shiptype.getCrew()), 
     1239                                        "shiptype.marines",             Common.ln(shiptype.getMarines()), 
    12391240                                        "ship.crew",                    Common.ln(ship.getCrew()), 
    12401241                                        "ship.crew.color",              genSubColor(ship.getCrew(), shiptype.getCrew()), 
     1242                                        "ship.marines.color",   genSubColor(ship.getMarines(), shiptype.getMarines()), 
    12411243                                        "ship.e",                               Common.ln(ship.getEnergy()), 
    12421244                                        "shiptype.eps",                 Common.ln(shiptype.getEps()), 
  • src/net/driftingsouls/ds2/server/modules/ks/KSKapernAction.java

    refe50c3 r390f9f1  
    143143                 
    144144                User euser = enemyShip.getOwner(); 
    145                          
    146                 int savecrew = (int)Math.round(ownShip.getCrew()/10d); 
    147                 if( savecrew <= 0 ) { 
    148                         savecrew = 1; 
    149                 } 
    150                 int acrew = ownShip.getCrew() - savecrew; 
     145 
     146                int amarines = ownShip.getMarines();    //angreifende Marines 
     147                int acrew = ownShip.getCrew(); 
     148                int dmarines = enemyShip.getMarines();  //verteidigende Marines 
    151149                int dcrew = enemyShip.getCrew(); 
    152150         
    153151                boolean ok = false; 
    154                 int keepcrew = 0; 
    155152         
    156153                String msg = ""; 
    157                 if( (acrew != 0) && (dcrew != 0) ) { 
     154                if( (amarines != 0) && ((dcrew != 0) || dmarines != 0 ) ) { 
    158155                        battle.logme("Die Crew st&uuml;rmt das Schiff\n"); 
    159156                        msg = "Die Crew der "+Battle.log_shiplink(ownShip.getShip())+" st&uuml;rmt die "+Battle.log_shiplink(enemyShip.getShip())+"\n"; 
     
    165162                                defmulti = (int)Math.round(offizier.getAbility(Offizier.Ability.SEC)/25d)+1; 
    166163                        } 
    167          
    168                         if( acrew >= dcrew*3*defmulti ) { 
     164//                      angreifenden Offizier hinzufuegen 
     165                        int attmulti = 1; 
     166                        Offizier aoffizier = Offizier.getOffizierByDest('s', ownShip.getId()); 
     167                        if( aoffizier != null ) { 
     168                                attmulti = (int)Math.round(aoffizier.getAbility(Offizier.Ability.COM)/25d)+1; 
     169                        } 
     170         
     171                        if( amarines*attmulti >= dcrew*3*defmulti + dmarines*3*defmulti) { 
    169172                                ok = true; 
    170173                                battle.logme("Die Crew gibt das Schiff kampflos auf und l&auml;uft &uuml;ber\n"); 
    171174                                msg += "Die Crew gibt das Schiff kampflos auf l&auml;uft &uuml;ber.\n"; 
    172                                 keepcrew = dcrew; 
    173175                        } 
    174176                        else { 
    175177                                //$dcrew = round(($dcrew*$defmulti - $acrew)/$defmulti); 
    176                                 if( dcrew*defmulti - acrew > 0 ) { 
    177                                         int oldacrew = acrew
     178                                if( Math.round(dcrew*defmulti + dmarines*defmulti - amarines*attmulti) > 0 ) { 
     179                                        int oldamarines = amarines
    178180                                        int olddcrew = dcrew; 
    179                                         acrew = (int)Math.round(acrew * 0.1); 
    180                                         if( acrew < 1 ) { 
    181                                                 acrew = 1; 
     181                                        int olddmarines = dmarines; 
     182                                        amarines = (int)Math.round(amarines * 0.1); 
     183                                        if( amarines < 1 ) { 
     184                                                amarines = 0; 
    182185                                        } 
    183186         
    184                                         dcrew = (int)Math.round((dcrew*defmulti - oldacrew+acrew)/(double)defmulti); 
    185                                         battle.logme((oldacrew-acrew)+" Crewmitglieder fallen. "+(olddcrew-dcrew)+" Feinde get&ouml;tet.\nAngriff abgebrochen\n"); 
    186                                         msg += (oldacrew-acrew)+" Angreifer erschossen. "+(olddcrew-dcrew)+" Crewmitglieder sind gefallen.\nDer Angreifer flieht\n"; 
     187                                        /* wenn der verteidiger mehr marines hat als der angreifen, dann nur marines berechnen 
     188                                        * hat der verteidiger nur mit crew mehr verteidigung, dann beides berechnen*/                                    
     189                                        if( Math.round(dmarines*defmulti - oldamarines*attmulti) >= 0){ 
     190                                                dmarines = Math.round(dmarines*defmulti - oldamarines*attmulti); 
     191                                        }else{ 
     192                                                dmarines = 0; 
     193                                                dcrew = Math.round(dcrew*defmulti - (oldamarines*attmulti - dmarines*defmulti)); 
     194                                        } 
     195                                        battle.logme((oldamarines-amarines)+" Marines fallen. "+(olddmarines-dmarines) +" Marines und "+ (olddcrew-dcrew)+" Besatzungsmitglieder get&ouml;tet.\nAngriff abgebrochen\n"); 
     196                                        msg += (oldamarines-amarines)+" Angreifer erschossen. "+(olddcrew-dcrew)+" Crewmitglieder und "+ (olddmarines-dmarines) +"Marines sind gefallen.\nDer Angreifer flieht\n"; 
     197                                         
    187198                                        ok = false; 
    188199         
     
    209220                        battle.logenemy("]]></action>\n"); 
    210221                         
    211                         ownShip.getShip().setCrew(acrew+savecrew); 
     222                        ownShip.getShip().setMarines(amarines); 
    212223                        ownShip.getShip().setBattleAction(true); 
    213224                        enemyShip.getShip().setCrew(dcrew); 
     225                        enemyShip.getShip().setMarines(dmarines); 
    214226                } 
    215227                         
     
    242254                        int newshipcrew = 0; 
    243255                        if( (acrew != 0) && (dcrew == 0) ) { 
    244                                 newshipcrew = acrew
     256                                newshipcrew = acrew/2
    245257                                if( newshipcrew > enemyShipType.getCrew() ) { 
    246258                                        newshipcrew = enemyShipType.getCrew(); 
    247259                                } 
    248                                 acrew -= newshipcrew;            
    249                                  
    250                                 ownShip.getShip().setCrew(acrew+savecrew); 
    251                                  
    252                                 battle.logme( (newshipcrew+keepcrew)+" Crewmitglieder werden auf dem gekaperten Schiff stationiert\n" ); 
    253                         } 
    254                         newshipcrew += keepcrew; 
     260                                acrew = acrew -newshipcrew;              
     261                                 
     262                                ownShip.getShip().setCrew(acrew); 
     263                                 
     264                                battle.logme( (newshipcrew)+" Crewmitglieder werden auf dem gekaperten Schiff stationiert\n" ); 
     265                        } 
    255266                         
    256267                        String currentTime = Common.getIngameTime(context.get(ContextCommon.class).getTick()); 
  • src/net/driftingsouls/ds2/server/ships/AbstractShipTypeDataWrapper.java

    r870bccb r390f9f1  
    7575                return inner.getCrew(); 
    7676        } 
     77         
     78        public int getMarines() { 
     79                return inner.getMarines(); 
     80        } 
    7781 
    7882        public String getDescrip() { 
  • src/net/driftingsouls/ds2/server/ships/Ship.java

    r870bccb r390f9f1  
    113113        private String status; 
    114114        private int crew; 
     115        private int marines; 
    115116        private int e; 
    116117        @Column(name="s") 
     
    414415 
    415416        /** 
     417         * Gibt die Anzahl Marines auf dem Schiff zurueck 
     418         * @return Die Anzahl Marines 
     419         */ 
     420        public int getMarines() { 
     421                return marines; 
     422        } 
     423 
     424        /** 
     425         * Setzt die Anzahl Marines auf dem Schiff 
     426         * @param marines Die neue Anzahl Marines 
     427         */ 
     428        public void setMarines(int marines) { 
     429                this.marines = marines; 
     430        } 
     431         
     432        /** 
    416433         * Gibt die Energiemenge auf dem Schiff zurueck 
    417434         * @return Die Energiemenge 
  • src/net/driftingsouls/ds2/server/ships/ShipModules.java

    r870bccb r390f9f1  
    5656        private int heat; 
    5757        private int crew; 
     58        private int marines; 
    5859        private String weapons; 
    5960        @Column(name="maxheat") 
     
    162163                this.crew = crew; 
    163164        } 
     165         
     166 
     167        public int getMarines() { 
     168                return marines; 
     169        } 
     170         
     171        /** 
     172         * Setzt die Anzahl an moeglichen Marines 
     173         * @param marines Die Marinemenge 
     174         */ 
     175        public void setMarines(int marines) { 
     176                this.marines = marines; 
     177        } 
    164178 
    165179        public int getDeutFactor() { 
  • src/net/driftingsouls/ds2/server/ships/ShipType.java

    r870bccb r390f9f1  
    5353        private int heat; 
    5454        private int crew; 
     55        private int marines; 
    5556        private String weapons; 
    5657        @Column(name="maxheat") 
     
    115116                return crew; 
    116117        } 
     118         
     119        public int getMarines(){ 
     120                return marines; 
     121        } 
    117122 
    118123        public String getDescrip() { 
  • src/net/driftingsouls/ds2/server/ships/ShipTypeChangeset.java

    r4126bcd