From 357a0885eb0ca53b3c8859e71110b91cf8336570 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sun, 19 Dec 2010 15:50:31 -0600 Subject: [PATCH] Added Sweeper attack ship. --- add_a_ship.txt | 6 +++--- lib/Lacuna/DB/Result/Ships.pm | 1 + lib/Lacuna/DB/Result/Ships/Fighter.pm | 2 +- lib/Lacuna/DB/Result/Ships/Snark.pm | 2 +- lib/Lacuna/DB/Result/Ships/Sweeper.pm | 28 +++++++++++++++++++++++++++ var/www/public/changes.txt | 1 + var/www/public/resources.json | 2 +- 7 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 lib/Lacuna/DB/Result/Ships/Sweeper.pm diff --git a/add_a_ship.txt b/add_a_ship.txt index 2e703b6be..fde943847 100644 --- a/add_a_ship.txt +++ b/add_a_ship.txt @@ -1,8 +1,8 @@ create ship class update Lacuna::DB::Result::Ships to add new ship type -create a ship image and upload it -create a ship medal and upload it update Lacuna::DB::Result::Medals +update Lacuna::Constant SHIP_TYPES update var/www/public/resources.json with new ship info add ship to wiki -update Lacuna::Constant SHIP_TYPES +create a ship image and upload it +create a ship medal and upload it diff --git a/lib/Lacuna/DB/Result/Ships.pm b/lib/Lacuna/DB/Result/Ships.pm index 2028667c8..1fa51fd0b 100644 --- a/lib/Lacuna/DB/Result/Ships.pm +++ b/lib/Lacuna/DB/Result/Ships.pm @@ -61,6 +61,7 @@ __PACKAGE__->typecast_map(type => { 'spy_shuttle' => 'Lacuna::DB::Result::Ships::SpyShuttle', 'drone' => 'Lacuna::DB::Result::Ships::Drone', 'fighter' => 'Lacuna::DB::Result::Ships::Fighter', + 'sweeper' => 'Lacuna::DB::Result::Ships::Sweeper', 'bleeder' => 'Lacuna::DB::Result::Ships::Bleeder', 'observatory_seeker' => 'Lacuna::DB::Result::Ships::ObservatorySeeker', 'spaceport_seeker' => 'Lacuna::DB::Result::Ships::SpacePortSeeker', diff --git a/lib/Lacuna/DB/Result/Ships/Fighter.pm b/lib/Lacuna/DB/Result/Ships/Fighter.pm index 56598c0a9..dec7238d5 100644 --- a/lib/Lacuna/DB/Result/Ships/Fighter.pm +++ b/lib/Lacuna/DB/Result/Ships/Fighter.pm @@ -10,7 +10,7 @@ use constant base_food_cost => 1000; use constant base_water_cost => 2600; use constant base_energy_cost => 16200; use constant base_ore_cost => 14200; -use constant base_time_cost => 14600; +use constant base_time_cost => 60 * 60 * 4; use constant base_waste_cost => 4200; use constant base_combat => 4000; use constant base_speed => 2000; diff --git a/lib/Lacuna/DB/Result/Ships/Snark.pm b/lib/Lacuna/DB/Result/Ships/Snark.pm index 0d661cf48..dae24995e 100644 --- a/lib/Lacuna/DB/Result/Ships/Snark.pm +++ b/lib/Lacuna/DB/Result/Ships/Snark.pm @@ -10,7 +10,7 @@ use constant base_food_cost => 18000; use constant base_water_cost => 46800; use constant base_energy_cost => 145000; use constant base_ore_cost => 195030; -use constant base_time_cost => 58400; +use constant base_time_cost => 60 * 60 * 16; use constant base_waste_cost => 39600; use constant base_speed => 1000; use constant base_stealth => 2400; diff --git a/lib/Lacuna/DB/Result/Ships/Sweeper.pm b/lib/Lacuna/DB/Result/Ships/Sweeper.pm new file mode 100644 index 000000000..1578d389b --- /dev/null +++ b/lib/Lacuna/DB/Result/Ships/Sweeper.pm @@ -0,0 +1,28 @@ +package Lacuna::DB::Result::Ships::Sweeper; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::DB::Result::Ships'; + +use constant prereq => { class=> 'Lacuna::DB::Result::Building::MunitionsLab', level => 16 }; +use constant base_food_cost => 5000; +use constant base_water_cost => 12000; +use constant base_energy_cost => 70000; +use constant base_ore_cost => 75000; +use constant base_time_cost => 60 * 60 * 7; +use constant base_waste_cost => 20000; +use constant base_combat => 8500; +use constant base_speed => 3000; +use constant base_stealth => 2800; +use constant pilotable => 1; +use constant build_tags => ['War']; + +with "Lacuna::Role::Ship::Send::Planet"; +with "Lacuna::Role::Ship::Send::Inhabited"; +with "Lacuna::Role::Ship::Send::NotIsolationist"; +with "Lacuna::Role::Ship::Arrive::TriggerDefense"; + + +no Moose; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index ce9d93b5b..644ce99b5 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -31,6 +31,7 @@ - Added Placebo 1 thru 6, which are used to fake an attack. - Added Bleeder attack ship. - Added Surveyor reconnaissance ship. + - Added Sweeper attack ship. 2.3902 - Halls of Vrbansk now also returns building URL. diff --git a/var/www/public/resources.json b/var/www/public/resources.json index 709dc9920..ceac1e3f7 100644 --- a/var/www/public/resources.json +++ b/var/www/public/resources.json @@ -119,7 +119,7 @@ "/wheat" : { "description" : "Allows you to grow wheat on your planet. You can only grow wheat on planets that are in orbits 2, 3 or 4 (the goldilox zone). The Farm will produce more wheat for each level it is increased. All plants need a source of phosphorus to photosynthesize their food. Therefore you need a good source of gypsum, sulfur, or monazite for plants to thrive.", "wiki" : "http://community.lacunaexpanse.com/wiki/wheat-farm" } }, "ships" : { - "placebo" : { "description" : "Use to fake an attack on another player. When it arrives it just harmlessly falls dead.", "wiki" : "http://community.lacunaexpanse.com/wiki/placebo" }, + "placebo" : { "description" : "Use to fake an attack on another player.", "wiki" : "http://community.lacunaexpanse.com/wiki/placebo" }, "placebo2" : { "description" : "A faster and more stealthed version of the Placebo.", "wiki" : "http://community.lacunaexpanse.com/wiki/placebo" }, "placebo3" : { "description" : "A faster and more stealthed version of the Placebo II.", "wiki" : "http://community.lacunaexpanse.com/wiki/placebo" }, "placebo4" : { "description" : "A faster and more stealthed version of the Placebo III.", "wiki" : "http://community.lacunaexpanse.com/wiki/placebo" },