* Removed lift tower
* Fix scaffolds walls to no longer move Clonks on creation
* Reduce scaffold hit points
* Add flints to home base material and more flints to landscape
* Remodeled landscape and chests a bit
* Made plane parts destructible on damage, so you can destroy them if they get stuck
* Tweaked storm push a bit
floating-point
Sven Eberhardt 2012-12-07 23:11:52 +01:00
parent 7ab2fe0ec9
commit 7cbf11e39d
37 changed files with 522 additions and 928 deletions

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -6,7 +6,8 @@ Width=60
Height=25
Offset=-30,-12
Vertices=6
VertexX=-25,-25,0,0,27,25
; VertexX=-25,-25,0,0,27,25 - doesnt fit in double elevator
VertexX=-22,-22,0,0,20,20
VertexY=7,-7,7,-7,-8,1
VertexFriction=30,60,30,60,60,30
Value=40

View File

@ -5,6 +5,9 @@
Used to construct the plane
--*/
#include Library_PlanePart
#include Library_ElevatorControl
private func Hit()
{
Sound("WoodHit");
@ -20,4 +23,5 @@ local Collectible = false;
local Name = "$Name$";
local Description = "$Description$";
local Rebuy = true;
local Touchable = 1; // todo: Later, this must be done with the lift tower
local Touchable = 1; // Later, this could be done with the lift tower. There is no working lift tower at the moment though :(
local HitPoints = 20;

View File

@ -5,6 +5,8 @@
Used to construct the plane
--*/
#include Library_PlanePart
private func Hit()
{
Sound("WoodHit");
@ -22,3 +24,4 @@ local Collectible = true;
local Name = "$Name$";
local Description = "$Description$";
local Rebuy = true;
local HitPoints = 20;

View File

@ -0,0 +1,4 @@
[DefCore]
id=Library_PlanePart
Version=5,2,2,0
Category=C4D_StaticBack

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

View File

@ -0,0 +1,18 @@
/**
Plane part Library
* Damage
@author Sven2
*/
public func Damage(int change, int cause, int cause_plr)
{
// Only do stuff if the object has the HitPoints property.
if (this && this.HitPoints != nil)
if (GetDamage() >= this.HitPoints)
{
// Destruction callback is made by the engine.
return RemoveObject();
}
return _inherited(change, cause, cause_plr, ...);
}

View File

@ -5,6 +5,8 @@
Used to construct the plane
--*/
#include Library_PlanePart
private func Hit()
{
Sound("WoodHit");
@ -20,3 +22,4 @@ local Collectible = true;
local Name = "$Name$";
local Description = "$Description$";
local Rebuy = true;
local HitPoints = 20;

View File

@ -5,6 +5,7 @@
Used to construct the plane
--*/
#include Library_PlanePart
#include Library_ElevatorControl
private func Hit()
@ -23,3 +24,4 @@ local Name = "$Name$";
local Description = "$Description$";
local Rebuy = true;
local Touchable = 1;
local HitPoints = 20;

View File

@ -5,6 +5,7 @@
Used to construct the plane
--*/
#include Library_PlanePart
#include Library_ElevatorControl
private func Hit()
@ -23,3 +24,4 @@ local Name = "$Name$";
local Description = "$Description$";
local Rebuy = true;
local Touchable = 1;
local HitPoints = 20;

View File

@ -9,6 +9,29 @@ func Initialize()
return _inherited(...);
}
func Destruction()
{
RemoveWalls();
return _inherited(...);
}
func Incineration()
{
RemoveWalls();
return _inherited(...);
}
func RemoveWalls()
{
if (wall_left) wall_left->RemoveObject();
if (wall_right) wall_right->RemoveObject();
if (wall_top) wall_top->RemoveObject();
if (wall_bottom) wall_bottom->RemoveObject();
if (wall_right2) wall_right2->RemoveObject();
if (wall_bottom2) wall_bottom2->RemoveObject();
return true;
}
/* Interaction */
local wall_left, wall_right, wall_top, wall_bottom;
@ -89,6 +112,6 @@ func Definition(def) {
local Name = "$Name$";
local Description = "$Description$";
local BlastIncinerate = 100;
local HitPoints = 70;
local HitPoints = 30;
local Plane = 120;
local Touchable = 1;

View File

@ -7,6 +7,7 @@ func SetLeft(object host)
SetGraphics("Left");
SetAction("Left", host);
SetShape(0,0,4,32);
SetPosition(host->GetX()-16, host->GetY()-16);
SetSolidMask(0,0,2,32);
SetVertexXY(0,1,1);
return true;
@ -17,6 +18,7 @@ func SetRight(object host)
SetGraphics("Right");
SetAction("Right", host);
SetShape(0,0,4,32);
SetPosition(host->GetX()+12, host->GetY()-16);
SetSolidMask(2,0,2,32,2,0);
SetVertexXY(0,-27,1);
return true;
@ -27,6 +29,7 @@ func SetRight2(object host)
SetGraphics("Right");
SetAction("Right", host);
SetShape(0,0,4,32);
SetPosition(host->GetX()+15, host->GetY()-48);
SetSolidMask(2,0,2,32,2,0);
SetVertexXY(0,-27-3,1+32);
return true;
@ -37,6 +40,7 @@ func SetTop(object host)
SetGraphics("Top");
SetAction("Top", host);
SetShape(0,0,32,4);
SetPosition(host->GetX()-16, host->GetY()-16);
SetSolidMask(0,4,32,4);
SetVertexXY(0,1,1);
return true;
@ -47,6 +51,7 @@ func SetBottom(object host)
SetGraphics("Bottom");
SetAction("Bottom", host);
SetShape(0,0,32,4);
SetPosition(host->GetX()-16, host->GetY()+12);
SetSolidMask(0,4,32,4);
SetVertexXY(0,1,-27);
return true;
@ -57,6 +62,7 @@ func SetBottom2(object host)
SetGraphics("Bottom");
SetAction("Bottom", host);
SetShape(0,0,32,4);
SetPosition(host->GetX()+13, host->GetY()+12);
SetSolidMask(0,4,32,4);
SetVertexXY(0,1-29,-27);
return true;

View File

@ -13,30 +13,27 @@ ValueOverloads=Nugget=10;GoldBar=50;
[Player1]
Wealth=50,0,0,250
Crew=Clonk=2
Knowledge=Plane_Engine=1;Scaffold=1;Foundry=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;LiftTower=1;Pump=1
HomeBaseMaterial=Loam=99;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5
HomeBaseProduction=Loam=10;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5
Knowledge=Plane_Engine=1;Scaffold=1;Foundry=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;Pump=1
HomeBaseMaterial=Loam=99;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5;Firestone=5
HomeBaseProduction=Loam=10;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5;Firestone=5
[Player2]
Wealth=50,0,0,250
Crew=Clonk=2
Knowledge=Plane_Engine=1;Scaffold=1;Foundry=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;LiftTower=1;Pump=1
HomeBaseMaterial=Loam=99;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5
HomeBaseProduction=Loam=10;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5
Knowledge=Plane_Engine=1;Scaffold=1;Foundry=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;Pump=1HomeBaseMaterial=Loam=99;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5;Firestone=5
HomeBaseProduction=Loam=10;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5;Firestone=5
[Player3]
Wealth=50,0,0,250
Crew=Clonk=2
Knowledge=Plane_Engine=1;Scaffold=1;Foundry=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;LiftTower=1;Pump=1
HomeBaseMaterial=Loam=99;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5
HomeBaseProduction=Loam=10;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5
Knowledge=Plane_Engine=1;Scaffold=1;Foundry=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;Pump=1HomeBaseMaterial=Loam=99;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5;Firestone=5
HomeBaseProduction=Loam=10;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5;Firestone=5
[Player4]
Wealth=50,0,0,250
Crew=Clonk=2
Knowledge=Plane_Engine=1;Scaffold=1;Foundry=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;LiftTower=1;Pump=1
HomeBaseMaterial=Loam=99;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5
HomeBaseProduction=Loam=10;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5
Knowledge=Plane_Engine=1;Scaffold=1;Foundry=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;Pump=1HomeBaseMaterial=Loam=99;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5;Firestone=5
HomeBaseProduction=Loam=10;Wood=5;Metal=3;Shovel=2;Axe=2;Hammer=2;Clonk=5;Bread=5;Firestone=5
[Landscape]
Sky=Clouds2

View File

@ -5,8 +5,6 @@
@authors Sven2
*/
static const LOAM_Bridge_Amount = 65; // longer bridges!
static g_is_initialized;
static g_intro_initialized;
@ -20,7 +18,7 @@ func DoInit(int first_player)
EnsureObject(Rule_BuyAtFlagpole,0,0,-1);
SetSkyAdjust(0xff000000);
var storm = EnsureObject(Storm,0,0,NO_OWNER);
storm->SetStorm(-20,0,2000);
storm->SetStorm(-20,0,1000);
SetSkyParallax(1); // move background with the wind
var time = EnsureObject(Environment_Time,0,0,-1);
time->SetTime(600);

View File

@ -265,17 +265,36 @@ private func ExecuteStream(proplist s)
var new_ty = y + s.dir_y + search_off * s.dir_x / s.dir_len;
if (new_tx != tx || new_ty != ty) StreamMoveVertex(s, i_segment+1, tx, ty, new_tx, new_ty);
tx = new_tx; ty = new_ty;
// determine storm density at this position
var map_idx = MapXYToIdx(tx, ty), local_strength;
if (map_idx>=0) local_strength = map[map_idx]; else local_strength=1;
// fling objects along path
vx = vx * strength / s.dir_len;
vy = vy * strength / s.dir_len; // - 20;
var fling_objs = FindObjects(find_mask, Find_OnLine(x,y,new_tx,new_ty)), obj;
for (obj in fling_objs) if (obj->GetID()==ElevatorCase) { fling_objs = []; break; } // do not fling stuff in elevator case
for (obj in fling_objs) if (!obj->Stuck())
for (obj in fling_objs)
{
// check if object can be pushed
if (obj->Stuck()) continue;
if (!PathFree(x,y,obj->GetX(),obj->GetY())) continue; // don't push through solid
// determine push strength. subsequent pushes of overlapping storm pathes stack diminishingly
var push_strength = strength/20,pushfx;
if (pushfx=GetEffect("StormPush",obj))
{
push_strength /= pushfx.count++;
if (!push_strength) continue;
}
else
{
pushfx=AddEffect("StormPush", obj, 1, 5, this);
if (pushfx) pushfx.count = 1;
}
// now push
var ovx = obj->GetXDir(100);
var ovy = obj->GetYDir(100);
var push_strength = strength/20;
if (Distance(ovx,ovy,vx,vy) > strength/3)
// check max speed
if (Distance(ovx,ovy,vx,vy) > push_strength*6)
{
if (Distance(ovx,ovy) > 500)
obj->Fling(BoundBy(vx-ovx,-push_strength,push_strength),BoundBy(vy-ovy,-push_strength,push_strength),100,true);
@ -287,22 +306,17 @@ private func ExecuteStream(proplist s)
}
}
// Gfx
if (do_particles)
if (do_particles && map_idx>=0)
{
var map_idx = MapXYToIdx(tx, ty);
if (map_idx>=0)
if (local_strength >= 1)
{
var local_strength = map[map_idx];
if (local_strength >= 1)
{
// Two streams coincide here. Gfx!
vx = tx-x; vy = ty-y;
var v = Distance(vx,vy);
vx = vx * s.dir_len / v;
vy = vy * s.dir_len / v / 2;
for (var i_part = 5; i_part<local_strength*6; ++i_part)
CreateParticle("StormParticle", x+Random(vx+20)-10, y+Random(vy+20)-10, vx*(Random(40)+80)/100,vy*(Random(40)+100)/100, 40, 0xffffffff);
}
// Two streams coincide here. Gfx!
vx = tx-x; vy = ty-y;
var v = Distance(vx,vy);
vx = vx * s.dir_len / v;
vy = vy * s.dir_len / v / 2;
for (var i_part = 5; i_part<local_strength*6; ++i_part)
CreateParticle("StormParticle", x+Random(vx+20)-10, y+Random(vy+20)-10, vx*(Random(40)+80)/100,vy*(Random(40)+100)/100, 40, 0xffffffff);
}
}
}

View File

@ -0,0 +1,5 @@
/* Longer loam bridges */
#appendto Loam
local BridgeLength = 650;