turn musket into blunderbuss

The musket was not a very popular and useful weapon, being inferior to the bow. It now shoots 5 weaker bullets in one shot with less damage per bullet, this might require some further testing and fine-tuning. Also the weaker bullets mean that they can be used in a gatling-gun (WIP) and in the airplane as well.
console-destruction
Maikel de Vries 2016-08-22 16:31:05 +02:00
parent 7935f736fe
commit e18cee3a46
82 changed files with 408 additions and 397 deletions

View File

@ -288,7 +288,7 @@ private func InitLorries()
lorry->CreateContents(WallKit, 1);
if (!Random(8))
{
lorry->CreateContents(Musket);
lorry->CreateContents(Blunderbuss);
lorry->CreateContents(LeadBullet);
}
}

View File

@ -161,7 +161,7 @@ protected func OnPlayerRelaunch(int plr)
return;
}
func RelaunchWeaponList() { return [Musket, Sword, Javelin, FrostboltScroll, Shovel]; }
func RelaunchWeaponList() { return [Blunderbuss, Sword, Javelin, FrostboltScroll, Shovel]; }
/*-- Chest filler effects --*/
@ -174,7 +174,7 @@ global func FxFillBaseChestStart(object target, effect, int temporary, bool supp
if(effect.supply_type)
var w_list = [Firestone, Dynamite, IronBomb, Shovel, Loam, Ropeladder];
else
var w_list = [Bow, Shield, Sword, Javelin, Musket, FrostboltScroll];
var w_list = [Bow, Shield, Sword, Javelin, Blunderbuss, FrostboltScroll];
for(var i=0; i<5; i++)
target->CreateChestContents(w_list[i]);
return 1;
@ -190,7 +190,7 @@ global func FxFillBaseChestTimer(object target, effect)
}
else
{
var w_list = [Bow, Shield, Sword, Javelin, Musket, FrostboltScroll];
var w_list = [Bow, Shield, Sword, Javelin, Blunderbuss, FrostboltScroll];
var maxcount = [1,2,1,1,1,2];
}
@ -252,7 +252,7 @@ global func CreateChestContents(id obj_id)
var obj = CreateObjectAbove(obj_id);
if (obj_id == Bow)
obj->CreateContents(Arrow);
if (obj_id == Musket)
if (obj_id == Blunderbuss)
obj->CreateContents(LeadBullet);
obj->Enter(this);
return;

View File

@ -175,7 +175,7 @@ global func FxFillBaseChestTimer(object target, effect)
}
else
{
var w_list = [Sword, Javelin, Musket, ShieldGem, PyreGem];
var w_list = [Sword, Javelin, Blunderbuss, ShieldGem, PyreGem];
var maxcount = [1,2,1,1,1];
}
@ -254,7 +254,7 @@ global func CreateChestContents(id obj_id)
if (obj_id == Bow)
obj->CreateContents(Arrow);
if (obj_id == Musket)
if (obj_id == Blunderbuss)
obj->CreateContents(LeadBullet);
if (obj_id == GrappleBow)
AddEffect("NotTooLong",obj,100,36);

View File

@ -177,7 +177,7 @@ func OnClonkLeftRelaunch(object clonk)
if (clonk) return LaunchPlayer(clonk->GetOwner());
}
func RelaunchWeaponList() { return [Bow, Sword, Club, Javelin, Musket, Firestone, IceWallKit]; }
func RelaunchWeaponList() { return [Bow, Sword, Club, Javelin, Blunderbuss, Firestone, IceWallKit]; }
func AcquireBase(int plr, int team)

View File

@ -115,7 +115,7 @@ global func FxIntFillChestsStart(object target, effect, int temporary)
{
if(temporary) return 1;
var chests = FindObjects(Find_ID(Chest));
var w_list = [Bow, Musket, Shield, Sword, Club, Javelin, Bow, Musket, Shield, Sword, Club, Javelin, DynamiteBox];
var w_list = [Bow, Blunderbuss, Shield, Sword, Club, Javelin, Bow, Blunderbuss, Shield, Sword, Club, Javelin, DynamiteBox];
for(var chest in chests)
for(var i=0; i<4; ++i)
@ -127,7 +127,7 @@ global func FxIntFillChestsTimer()
{
SetTemperature(100);
var chests = FindObjects(Find_ID(Chest));
var w_list = [IronBomb, Rock, IronBomb, Firestone, Firestone, Bow, Musket, Sword, Javelin];
var w_list = [IronBomb, Rock, IronBomb, Firestone, Firestone, Bow, Blunderbuss, Sword, Javelin];
for(var chest in chests)
if (chest->ContentsCount() < 5 )
chest->CreateChestContents(w_list[Random(GetLength(w_list))]);
@ -141,7 +141,7 @@ global func CreateChestContents(id obj_id)
var obj = CreateObjectAbove(obj_id);
if (obj_id == Bow)
obj->CreateContents(Arrow);
if (obj_id == Musket)
if (obj_id == Blunderbuss)
obj->CreateContents(LeadBullet);
obj->Enter(this);
return;
@ -174,4 +174,4 @@ protected func JoinPlayer(int plr)
return;
}
func RelaunchWeaponList() { return [Bow, Shield, Sword, Javelin, Musket, Club]; }
func RelaunchWeaponList() { return [Bow, Shield, Sword, Javelin, Blunderbuss, Club]; }

View File

@ -1,4 +1,4 @@
#appendto Musket
#appendto Blunderbuss
local king_size;
@ -38,7 +38,7 @@ private func FireWeapon(object clonk, int angle)
loaded = false;
SetProperty("PictureTransformation",Trans_Mul(Trans_Translate(1500,0,-1500),Trans_Rotate(170,0,1,0),Trans_Rotate(30,0,0,1)));
Sound("Objects::Weapons::Musket::GunShoot?");
Sound("Objects::Weapons::Blunderbuss::GunShoot?");
// Muzzle Flash & gun smoke
var IX=Sin(180-angle,MuskFront);

View File

@ -255,7 +255,7 @@ global func FxFillChestStart(object target, proplist effect, int temporary)
{
if (temporary)
return 1;
var w_list = [Shield, Javelin, FireballScroll, Bow, Musket, WindScroll, TeleportScroll];
var w_list = [Shield, Javelin, FireballScroll, Bow, Blunderbuss, WindScroll, TeleportScroll];
for (var i = 0; i < 4; i++)
target->CreateChestContents(w_list[Random(GetLength(w_list))]);
return 1;
@ -265,7 +265,7 @@ global func FxFillChestTimer(object target, proplist effect)
{
if (Random(5))
return 1;
var w_list = [Balloon, Boompack, IronBomb, Shield, Javelin, Bow, Musket, Boompack, IronBomb, Shield, Javelin, Bow, Musket, TeleportScroll, WindScroll, FireballScroll];
var w_list = [Balloon, Boompack, IronBomb, Shield, Javelin, Bow, Blunderbuss, Boompack, IronBomb, Shield, Javelin, Bow, Blunderbuss, TeleportScroll, WindScroll, FireballScroll];
if (target->ContentsCount() < 6)
target->CreateChestContents(w_list[Random(GetLength(w_list))]);
@ -328,7 +328,7 @@ global func CreateChestContents(id obj_id)
var obj = CreateObjectAbove(obj_id);
if (obj_id == Bow)
obj->CreateContents(Arrow);
if (obj_id == Musket)
if (obj_id == Blunderbuss)
obj->CreateContents(LeadBullet);
obj->Enter(this);
return;
@ -363,4 +363,4 @@ protected func OnPlayerRelaunch(int plr)
}
func KillsToRelaunch() { return 0; }
func RelaunchWeaponList() { return [Bow, Javelin, Musket, FireballScroll, WindScroll, TeleportScroll]; }
func RelaunchWeaponList() { return [Bow, Javelin, Blunderbuss, FireballScroll, WindScroll, TeleportScroll]; }

View File

@ -98,7 +98,7 @@ global func FxIntFillChestsStart(object target, proplist effect, int temporary,
if (temporary)
return 1;
// Store weapon list and chest.
effect.w_list = [Dynamite, Dynamite, Firestone, Firestone, Bow, Musket, Club, Sword, Javelin, IronBomb, PowderKeg];
effect.w_list = [Dynamite, Dynamite, Firestone, Firestone, Bow, Blunderbuss, Club, Sword, Javelin, IronBomb, PowderKeg];
effect.chest = chest;
// Fill the chest with ten items.
for (var i = 0; i < 10; i++)
@ -121,7 +121,7 @@ global func CreateChestContents(id obj_id)
var obj = CreateObjectAbove(obj_id);
if (obj_id == Bow)
obj->CreateContents([Arrow, BombArrow][Random(2)]);
if (obj_id == Musket)
if (obj_id == Blunderbuss)
obj->CreateContents(LeadBullet);
obj->Enter(this);
return;
@ -136,4 +136,4 @@ public func OnClonkLeftRelaunch(object clonk)
}
public func KillsToRelaunch() { return 0; }
public func RelaunchWeaponList() { return [Bow, Shield, Sword, Firestone, Dynamite, Javelin, Musket]; }
public func RelaunchWeaponList() { return [Bow, Shield, Sword, Firestone, Dynamite, Javelin, Blunderbuss]; }

View File

@ -88,7 +88,7 @@ global func FxIntFillChestsStart(object target, effect, int temporary)
{
if(temporary) return 1;
var chests = FindObjects(Find_ID(Chest));
var w_list = [Bow, Musket, Shield, Sword, Club, GrenadeLauncher, Bow, Musket, Shield, Sword, Club, GrenadeLauncher, DynamiteBox];
var w_list = [Bow, Blunderbuss, Shield, Sword, Club, GrenadeLauncher, Bow, Blunderbuss, Shield, Sword, Club, GrenadeLauncher, DynamiteBox];
for(var chest in chests)
for(var i=0; i<4; ++i)
@ -100,7 +100,7 @@ global func FxIntFillChestsTimer()
{
SetTemperature(100);
var chest = FindObjects(Find_ID(Chest), Sort_Random())[0];
var w_list = [Boompack, IronBomb, IronBomb, Firestone, Bow, Musket, Sword, Javelin];
var w_list = [Boompack, IronBomb, IronBomb, Firestone, Bow, Blunderbuss, Sword, Javelin];
if (chest->ContentsCount() < 5)
chest->CreateChestContents(w_list[Random(GetLength(w_list))]);
@ -114,7 +114,7 @@ global func CreateChestContents(id obj_id)
var obj = CreateObjectAbove(obj_id);
if (obj_id == Bow)
obj->CreateContents(Arrow);
if (obj_id == Musket)
if (obj_id == Blunderbuss)
obj->CreateContents(LeadBullet);
obj->Enter(this);
return;
@ -127,4 +127,4 @@ func OnClonkLeftRelaunch(object clonk)
}
func KillsToRelaunch() { return 0; }
func RelaunchWeaponList() { return [Bow, Shield, Sword, Club, Javelin, Musket]; }
func RelaunchWeaponList() { return [Bow, Shield, Sword, Club, Javelin, Blunderbuss]; }

View File

@ -189,7 +189,7 @@ global func FxIntFillChestsStart(object target, effect, int temporary)
{
if(temporary) return 1;
var chests = FindObjects(Find_ID(Chest),Find_InRect(0,0,LandscapeWidth(),610));
var w_list = [Shield, Javelin, FireballScroll, Bow, Musket, WindScroll, ThunderScroll];
var w_list = [Shield, Javelin, FireballScroll, Bow, Blunderbuss, WindScroll, ThunderScroll];
for(var chest in chests)
for(var i=0; i<4; ++i)
@ -201,7 +201,7 @@ global func FxIntFillChestsTimer()
{
SetTemperature(100);
var chest = FindObjects(Find_ID(Chest), Sort_Random())[0];
var w_list = [Javelin, Bow, Musket, Boompack, IronBomb, Shield, WindScroll, FireballScroll, ThunderScroll, Club, Sword];
var w_list = [Javelin, Bow, Blunderbuss, Boompack, IronBomb, Shield, WindScroll, FireballScroll, ThunderScroll, Club, Sword];
var maxcount = [1,1,1,1,2,1,1,2,2,1,1];
var contents;
@ -237,7 +237,7 @@ if (!this)
var obj = CreateObjectAbove(obj_id);
if (obj_id == Bow)
obj->CreateContents(Arrow);
if (obj_id == Musket)
if (obj_id == Blunderbuss)
obj->CreateContents(LeadBullet);
obj->Enter(this);
return;
@ -273,4 +273,4 @@ protected func JoinPlayer(int plr)
}
func KillsToRelaunch() { return 0; }
func RelaunchWeaponList() { return [Bow, Javelin, Musket, FireballScroll, WindScroll, ThunderScroll]; }
func RelaunchWeaponList() { return [Bow, Javelin, Blunderbuss, FireballScroll, WindScroll, ThunderScroll]; }

View File

@ -1,7 +1,7 @@
/* Apply upgrades to ranged weapons */
#appendto Bow
#appendto Musket
#appendto Blunderbuss
#appendto GrenadeLauncher
#appendto Javelin
@ -45,7 +45,7 @@ public func Gidl_UpdateLoadTimes()
public func Guardians_UpdateShootingStrength()
{
if (!Contained()) return false;
if (GetID() == Musket) return false; // Update not for muskets
if (GetID() == Blunderbuss) return false; // Update not for blunderbusses
var base = g_homebases[Contained()->GetOwner()];
if (base)
{

View File

@ -112,7 +112,7 @@ func JoinPlayer(plr, prev_clonk)
clonk->Collect(arrow);
arrow->SetInfiniteStackCount();
}
//clonk->CreateContents(Musket);
//clonk->CreateContents(Blunderbuss);
//clonk->Collect(CreateObjectAbove(LeadBullet));
clonk->~CrewSelection(); // force update HUD
return;
@ -122,14 +122,14 @@ func JoinPlayer(plr, prev_clonk)
func FillHomebase(object homebase)
{
// Quick buy items on hotkeys
homebase->SetQuickbuyItems([/*Hammer*/ nil, Bow, Sword, Musket, GrenadeLauncher, nil, Firestone, IronBomb, nil, nil]);
homebase->SetQuickbuyItems([/*Hammer*/ nil, Bow, Sword, Blunderbuss, GrenadeLauncher, nil, Firestone, IronBomb, nil, nil]);
// Buy menu entries
homebase->AddCaption("$HomebaseWeapons$");
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = Bow, ammo = Arrow, desc = "$HomebaseDescBow$" });
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = Sword, cost = 25 });
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Consumable { item = Firestone, cost = 5});
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = Musket, cost = 50, ammo = LeadBullet, desc = "$HomebaseDescMusket$", requirements = ["AdvancedWeapons"] });
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = Blunderbuss, cost = 50, ammo = LeadBullet, desc = "$HomebaseDescBlunderbuss$", requirements = ["AdvancedWeapons"] });
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Consumable { item = IronBomb, cost = 15, requirements = ["AdvancedWeapons"] });
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Consumable { item = DynamiteBox,cost = 15, requirements = ["AdvancedWeapons"] });
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = GrenadeLauncher, ammo = IronBomb, desc = "$HomebaseDescGrenadeLauncher$", requirements = ["MasterWeapons"] });

View File

@ -5,7 +5,7 @@ MsgRelaunch=Relaunch %s.
EnemyNewbie=Newbie
EnemyAmazon=Amazone
EnemyBow=Bogenschütze
EnemyBow=Bogensch<EFBFBD>tze
EnemySuicide=Bomber
EnemySwordman=Schwertie
EnemySwordman2=Superschwertie
@ -14,7 +14,7 @@ EnemyOgre=Oger
EnemyArtillery=Artillerie
EnemyRunner=Bekloppter
WaveNewbies=Nur zum Aufwärmen
WaveNewbies=Nur zum Aufw<EFBFBD>rmen
WaveBows=Fernkampfalarm!
TeamAttackers=Angreifer
@ -27,7 +27,7 @@ HomebaseUpgrades=Verbesserungen
HomebaseArtifacts=Artefakte
HomebaseDescBow=Klassische Fernkampfwaffe. Endlos Pfeile.
HomebaseDescMusket=Moderne Feuerwaffe. Endlos Munition.
HomebaseDescBlunderbuss=Moderne Feuerwaffe. Endlos Munition.
HomebaseDescGrenadeLauncher=Schleudert Bomben in die Gegner. Endlos Bomben.
HomebaseDescHammer=Zum Errichten von Verteidigungstuermen und anderen Gebaeuden.

View File

@ -27,7 +27,7 @@ HomebaseUpgrades=Upgrades
HomebaseArtifacts=Artifacts
HomebaseDescBow=Classic ranged weapon. Infinite arrows.
HomebaseDescMusket=Modern fire weapon. Infinite ammunition.
HomebaseDescBlunderbuss=Modern fire weapon. Infinite ammunition.
HomebaseDescGrenadeLauncher=Launches bombs at the enemies. Infinite bombs.
HomebaseDescHammer=To construct defensive towers and other buildings.

View File

@ -117,13 +117,13 @@ func JoinPlayer(plr, prev_clonk)
func FillHomebase(object homebase)
{
// Quick buy items on hotkeys
homebase->SetQuickbuyItems([WindBag, Bow, Javelin, Musket, GrenadeLauncher, nil, nil, nil, nil, nil]);
homebase->SetQuickbuyItems([WindBag, Bow, Javelin, Blunderbuss, GrenadeLauncher, nil, nil, nil, nil, nil]);
// Buy menu entries
homebase->AddCaption("$HomebaseWeapons$");
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = Bow, ammo = Arrow, desc = "$HomebaseDescBow$" });
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = Javelin, cost = 10, desc = "$HomebaseDescJavelin$" , infinite = true});
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = Musket, cost = 50, ammo = LeadBullet, desc = "$HomebaseDescMusket$", requirements = ["AdvancedWeapons"] });
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = Blunderbuss, cost = 50, ammo = LeadBullet, desc = "$HomebaseDescBlunderbuss$", requirements = ["AdvancedWeapons"] });
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = GrenadeLauncher, ammo = IronBomb, desc = "$HomebaseDescGrenadeLauncher$", requirements = ["MasterWeapons"] });
homebase->AddHomebaseItem(new Homebase.ITEMTYPE_Weapon { item = WindBag, cost = 500, desc = "$HomebaseDescWindBag$", requirements = ["MasterWeapons"] });

View File

@ -33,7 +33,7 @@ HomebaseArtifacts=Artefakte
HomebaseDescBow=Mittlere Reichweite, geringer Schaden. Endlos Pfeile.
HomebaseDescJavelin=Kurze Reichweite, hoher Schaden. Endlos Speere.
HomebaseDescMusket=Hohe Reichweite, mittlerer Schaden. Endlos Munition.
HomebaseDescBlunderbuss=Hohe Reichweite, mittlerer Schaden. Endlos Munition.
HomebaseDescGrenadeLauncher=Schleudert Bomben in die Gegner. Endlos Bomben.
HomebaseDescWindBag=Lässt Luftstöße los, die Gegner von den Füßen fegen.
HomebaseDescHammer=Zum Errichten von Verteidigungstuermen und anderen Gebaeuden.
@ -41,7 +41,7 @@ HomebaseDescHammer=Zum Errichten von Verteidigungstuermen und anderen Gebaeuden.
HomebaseLoadSpeed=Nachladezeit
HomebaseDescLoadSpeed=Verkürzt den Ladevorgang von Fernkampfwaffen (alle).
HomebaseShootingStrength=Schusskraft
HomebaseDescShootingStrength=Verstärkt die Schusskraft, wodurch die Waffen weiter schießen (außer Muskete).
HomebaseDescShootingStrength=Verstärkt die Schusskraft, wodurch die Waffen weiter schießen (außer Donnerbüchse).
HomebaseLife=Lebensenergie
HomebaseDescLife=Erhöht die Lebensenergie des Clonks.
HomebaseAdvancedWeapons=Fortgeschrittene Waffen

View File

@ -33,7 +33,7 @@ HomebaseArtifacts=Artifacts
HomebaseDescBow=Medium range, low damage. Endless arrows.
HomebaseDescJavelin=Short range, high damage. Endless javelins.
HomebaseDescMusket=High range, medium damage. Endloss bullets.
HomebaseDescBlunderbuss=High range, medium damage. Endloss bullets.
HomebaseDescGrenadeLauncher=Launches bombs at the enemies. Infinite bombs.
HomebaseDescWindBag=Releases air blasts to knock enemies of their feet.
HomebaseDescHammer=To construct defensive towers and other buildings.
@ -41,7 +41,7 @@ HomebaseDescHammer=To construct defensive towers and other buildings.
HomebaseLoadSpeed=Load speed
HomebaseDescLoadSpeed=Shortens reload time of ranged weapons (all).
HomebaseShootingStrength=Shooting strength.
HomebaseDescShootingStrength=Strengthens weapons, makes them shoot farer (except musket).
HomebaseDescShootingStrength=Strengthens weapons, makes them shoot farer (except blunderbuss).
HomebaseLife=Life energy
HomebaseDescLife=Makes your clonk able to take more damage.
HomebaseAdvancedWeapons=Advanced weapons

View File

@ -480,7 +480,7 @@ func InitializeObjects()
var Mushroom006 = CreateObject(Mushroom, 396, 1410);
Mushroom006->SetCon(13);
Chest006->CreateContents(Musket);
Chest006->CreateContents(Blunderbuss);
Chest006->CreateContents(LeadBullet, 3);

View File

@ -234,7 +234,7 @@ func InitializeObjects()
CreateObjectAbove(Mushroom, 1206, 488);
Chest0225->CreateContents(Mushroom);
Chest0225->CreateContents(Musket);
Chest0225->CreateContents(Blunderbuss);
Chest0225->CreateContents(LeadBullet);

View File

@ -465,7 +465,7 @@ func DoUpdateAttach(int sec)
this.hand_display.on_back = true;
}
}
else if(attach_mode == CARRY_Musket)
else if(attach_mode == CARRY_Blunderbuss)
{
if(HasHandAction(sec, 1) && !sec)
{
@ -525,7 +525,7 @@ static const CARRY_HandAlways = 3;
static const CARRY_Back = 4;
static const CARRY_BothHands = 5;
static const CARRY_Spear = 6;
static const CARRY_Musket = 7;
static const CARRY_Blunderbuss = 7;
static const CARRY_Grappler = 8;
static const CARRY_Belt = 9;
static const CARRY_Sword = 10;

View File

@ -133,7 +133,7 @@ private func GiveWeapon(id weapon_id)
var newobj = CreateObjectAbove(weapon_id);
if (weapon_id == Bow)
newobj->CreateContents(Arrow);
if (weapon_id == Musket)
if (weapon_id == Blunderbuss)
newobj->CreateContents(LeadBullet);
crew->Collect(newobj);
return;

View File

@ -641,7 +641,7 @@ private func FindInventoryWeapon(fx)
else
fx.weapon = nil;
}
if (fx.weapon = FindContents(Musket))
if (fx.weapon = FindContents(Blunderbuss))
{
if (HasAmmo(fx, fx.weapon))
{ fx.strategy = fx.ai.ExecuteRanged; fx.projectile_speed = 200; fx.aim_wait = 85; fx.ammo_check = fx.ai.HasAmmo; fx.ranged=true; fx.ranged_direct = true; return true; }

View File

@ -228,7 +228,7 @@ public func IsInventorProduct() { return true; }
public func GetCarryMode(object clonk)
{
return CARRY_Musket;
return CARRY_Blunderbuss;
}
public func GetCarryTransform(object clonk, bool idle, bool nohand, bool second_on_back)

View File

@ -7,10 +7,10 @@
#include Library_Stackable
public func MaxStackCount() { return 8; }
public func MaxStackCount() { return 40; }
public func IsBullet() { return true; }
public func ProjectileDamage() { return 15; }
public func ProjectileDamage() { return 5; }
public func TumbleStrength() { return 100; }
public func FlightTime() { return 30; }
@ -19,19 +19,19 @@ protected func Hit()
if (GetEffect("HitCheck", this))
{
RemoveEffect("HitCheck", this);
Sound("Objects::Weapons::Musket::BulletHitGround?");
Sound("Objects::Weapons::Blunderbuss::BulletHitGround?");
CreateParticle("StarSpark", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(10, 20), Particles_Glimmer(), 3);
RemoveObject();
}
return;
}
public func Launch(object shooter, int angle, int dist, int speed, int offset_x, int offset_y)
public func Launch(object shooter, int angle, int dist, int speed, int offset_x, int offset_y, int prec_angle)
{
SetController(shooter->GetController());
AddEffect("HitCheck", this, 1, 1, nil, nil, shooter);
LaunchProjectile(angle, dist, speed, offset_x, offset_y);
LaunchProjectile(angle, dist, speed, offset_x, offset_y, prec_angle);
// Remove after some time.
SetAction("Travel");
@ -44,7 +44,7 @@ public func Launch(object shooter, int angle, int dist, int speed, int offset_x,
CreateObject(BulletTrail)->Set(this, 2, 200);
// Sound.
Sound("Objects::Weapons::Musket::BulletShot?");
Sound("Objects::Weapons::Blunderbuss::BulletShot?");
}
public func HitObject(object obj)
@ -54,7 +54,7 @@ public func HitObject(object obj)
if (obj->GetAlive())
Sound("Hits::ProjectileHitLiving?");
else
Sound("Objects::Weapons::Musket::BulletHitGround?");
Sound("Objects::Weapons::Blunderbuss::BulletHitGround?");
obj->~OnProjectileHit(this);
WeaponDamage(obj, this->ProjectileDamage(), FX_Call_EngObjHit, false);

View File

@ -1,5 +1,5 @@
[DefCore]
id=Musket
id=Blunderbuss
Version=6,0
Category=C4D_Object
Width=26

View File

@ -0,0 +1,240 @@
/**
Blunderbuss
Shoots up to five bullets at once, ideal short range weapon.
@author: Ringwaul
*/
#include Library_HasExtraSlot
local is_aiming;
local animation_set;
local loaded;
local holding;
local musk_up, musk_front, musk_down, musk_offset;
/*-- Engine Callbacks --*/
public func Initialize()
{
// Tweaking options
musk_up = 12;
musk_front = 13;
musk_down = 16;
musk_offset = -8;
loaded = false;
is_aiming = false;
animation_set = {
AimMode = AIM_Position, // The aiming animation is done by adjusting the animation position to fit the angle.
AnimationAim = "MusketAimArms",
AnimationLoad = "MusketLoadArms",
LoadTime = 80,
AnimationShoot = nil,
ShootTime = 20,
WalkSpeed = 84,
WalkBack = 56,
};
}
public func Hit()
{
Sound("Hits::GeneralHit?");
}
public func RejectCollect(id shotid, object shot)
{
// Only collect blunderbuss-ammo, which are bullets.
if (shot->~IsBullet())
return false;
return true;
}
/*-- Callbacks --*/
public func GetAnimationSet() { return animation_set; }
// Callback from the clonk when loading is finished.
public func FinishedLoading(object clonk)
{
SetLoaded();
if (holding)
clonk->StartAim(this);
// False means stop here and reset the clonk.
return holding;
}
// Callback from the clonk, when he actually has stopped aiming.
public func FinishedAiming(object clonk, int angle)
{
if (!loaded) return;
// Fire
if (Contents(0) && Contents(0)->IsBullet())
FireWeapon(clonk, angle);
clonk->StartShoot(this);
return true;
}
// Can only be stacked with same state: loaded vs. non-loaded.
public func CanBeStackedWith(object other)
{
return this->IsLoaded() == other->~IsLoaded() && inherited(other, ...);
}
/*-- Usage --*/
public func HoldingEnabled() { return true; }
public func RejectUse(object clonk)
{
return !clonk->HasHandAction(false, false, true);
}
public func ControlUseStart(object clonk, int x, int y)
{
// Nothing in extraslot?
if (!Contents(0))
{
// Put some bullets into the blunderbuss.
var obj;
if (obj = FindObject(Find_Container(clonk), Find_Func("IsBullet")))
obj->Enter(this);
}
// Something in extraslot?
if (!Contents(0))
{
clonk->CancelUse();
Sound("Objects::Weapons::Blunderbuss::Click*");
return true;
}
is_aiming = true;
holding = true;
// Reload weapon if not loaded yet.
if (!loaded)
clonk->StartLoad(this);
else
clonk->StartAim(this);
ControlUseHolding(clonk, x, y);
return true;
}
public func ControlUseHolding(object clonk, int x, int y)
{
var angle = Angle(0, 0, x, y - musk_offset);
angle = Normalize(angle, -180);
clonk->SetAimPosition(angle);
return true;
}
public func ControlUseCancel(object clonk, int x, int y)
{
clonk->CancelAiming(this);
return true;
}
public func ControlUseStop(object clonk, int x, int y)
{
holding = false;
clonk->StopAim();
return true;
}
public func Reset(clonk)
{
is_aiming = false;
}
public func FireWeapon(object clonk, int angle)
{
// Calculate offset for shot and effects.
var off_x = Sin(180 - angle, musk_front);
var off_y = Cos(180 - angle, musk_up) + musk_offset;
if (Abs(Normalize(angle, -180)) > 90)
off_y = Cos(180 - angle, musk_down) + musk_offset;
// Shoot up to five bullets at the same time.
for (var cnt = 0; cnt < this.BulletsPerShot; cnt++)
{
if (!Contents(0))
break;
var shot = Contents(0)->TakeObject();
shot->Launch(clonk, angle * 100 + RandomX(-this.BulletSpread, this.BulletSpread), RandomX(-1, 1), 200 + RandomX(-4, 4), off_x, off_y, 100);
}
// Muzzle Flash & gun smoke.
var x = Sin(angle, 20);
var y = -Cos(angle, 20);
CreateParticle("Smoke", off_x, off_y, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
clonk->CreateMuzzleFlash(off_x, off_y, angle, 20);
CreateParticle("Flash", 0, 0, 0, 0, 8, Particles_Flash());
// Change picture to indicate being unloaded.
loaded = false;
this.PictureTransformation = Trans_Mul(Trans_Translate(1500, 0, -1500), Trans_Rotate(170, 0, 1, 0), Trans_Rotate(30, 0, 0, 1));
// Gun blast sound.
Sound("Objects::Weapons::Blunderbuss::GunShoot?");
return;
}
public func SetLoaded()
{
loaded = true;
// Change picture to indicate being loaded.
this.PictureTransformation = Trans_Mul(Trans_Translate(500, 1000, 0), Trans_Rotate(130, 0, 1, 0), Trans_Rotate(20, 0, 0, 1));
return;
}
public func IsLoaded() { return loaded; }
/*-- Production --*/
public func IsWeapon() { return true; }
public func IsArmoryProduct() { return true; }
/*-- Display --*/
public func GetCarryMode(object clonk, bool idle, bool nohand)
{
if (idle || nohand)
return CARRY_Back;
return CARRY_Blunderbuss;
}
public func GetCarrySpecial(clonk)
{
if (is_aiming) return "pos_hand2";
}
public func GetCarryTransform()
{
return Trans_Rotate(90, 1, 0, 0);
}
public func Definition(def)
{
SetProperty("PictureTransformation", Trans_Mul(Trans_Translate(1500, 0, -1500), Trans_Rotate(170, 0, 1, 0), Trans_Rotate(30, 0, 0, 1)), def);
}
/*-- Properties --*/
local Name = "$Name$";
local Description = "$Description$";
local Collectible = true;
local ForceFreeHands = true;
local Components = {Wood = 1, Metal = 2};
local BulletsPerShot = 5;
local BulletSpread = 300;

View File

@ -0,0 +1,2 @@
Name=Donnerbüchse
Description=Feuerwaffe. Die Donnerbüchse benötigt Bleikugeln als Munition. Ziele und schieße mit [Benutzen].

View File

@ -0,0 +1,2 @@
Name=Blunderbuss
Description=Firearm. The blunderbuss needs lead shot for ammunition. Aim and shoot with [Use].

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -240,7 +240,7 @@ public func GetCarryMode(object clonk, bool idle, bool nohand)
if (idle || nohand)
return CARRY_Back;
return CARRY_Musket;
return CARRY_Blunderbuss;
}
public func GetCarrySpecial(clonk)

View File

@ -179,7 +179,7 @@ func FireWeapon(object clonk, int angle)
// Reset transformation to indicate empty grenade launcher.
this.PictureTransformation = this.Prototype.PictureTransformation;
Sound("Objects::Weapons::Musket::GunShoot?");
Sound("Objects::Weapons::Blunderbuss::GunShoot?");
// Muzzle Flash & gun smoke
if(Abs(Normalize(angle,-180)) > 90)
@ -215,7 +215,7 @@ public func GetCarryMode(object clonk, bool idle, bool nohand)
if (idle || nohand)
return CARRY_Back;
return CARRY_Musket;
return CARRY_Blunderbuss;
}
public func GetCarrySpecial()

View File

@ -32,7 +32,7 @@ protected func Hit()
{
ShakeFree(6);
RemoveEffect("HitCheck", this);
Sound("Objects::Weapons::Musket::BulletHitGround?");
Sound("Objects::Weapons::Blunderbuss::BulletHitGround?");
CreateParticle("StarSpark", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(10, 20), Particles_Glimmer(), 3);
return RemoveObject();
}

View File

@ -1,231 +0,0 @@
/**
Musket
A single shot musket which fires metal-shot at incredible speed.
@author: Ringwaul
*/
#include Library_HasExtraSlot
local is_aiming;
local animation_set;
local loaded;
local reload;
local yOffset;
local iBarrel;
local holding;
local MuskUp; local MuskFront; local MuskDown; local MuskOffset;
/*-- Engine Callbacks --*/
func Initialize()
{
//Tweaking options
MuskUp = 12;
MuskFront = 13;
MuskDown = 16;
MuskOffset = -8;
loaded = false;
is_aiming = false;
animation_set = {
AimMode = AIM_Position, // The aiming animation is done by adjusting the animation position to fit the angle
AnimationAim = "MusketAimArms",
AnimationLoad = "MusketLoadArms",
LoadTime = 80,
AnimationShoot = nil,
ShootTime = 20,
WalkSpeed = 84,
WalkBack = 56,
};
}
func Hit()
{
Sound("Hits::GeneralHit?");
}
func RejectCollect(id shotid, object shot)
{
// Only collect musket-ammo
if(!(shot->~IsBullet())) return true;
}
/*-- Callbacks --*/
public func GetAnimationSet() { return animation_set; }
// Callback from the clonk when loading is finished
public func FinishedLoading(object clonk)
{
SetLoaded();
if(holding) clonk->StartAim(this);
return holding; // false means stop here and reset the clonk
}
// Callback from the clonk, when he actually has stopped aiming
public func FinishedAiming(object clonk, int angle)
{
if(!loaded) return;
// Fire
if(Contents(0) && Contents(0)->IsBullet())
FireWeapon(clonk, angle);
clonk->StartShoot(this);
return true;
}
// Can only be stacked with same state: loaded vs. non-loaded.
public func CanBeStackedWith(object other)
{
return this->IsLoaded() == other->~IsLoaded() && inherited(other, ...);
}
/*-- Usage --*/
public func HoldingEnabled() { return true; }
public func RejectUse(object clonk)
{
return !clonk->HasHandAction(false, false, true);
}
public func ControlUseStart(object clonk, int x, int y)
{
// nothing in extraslot?
if(!Contents(0))
{
// put something inside
var obj;
if(obj = FindObject(Find_Container(clonk), Find_Func("IsBullet")))
{
obj->Enter(this);
}
}
// something in extraslot
if(!Contents(0))
{
clonk->CancelUse();
Sound("Objects::Weapons::Musket::Click*");
return true;
}
is_aiming = true;
holding = true;
// reload weapon if not loaded yet
if(!loaded)
clonk->StartLoad(this);
else
clonk->StartAim(this);
ControlUseHolding(clonk, x, y);
return true;
}
public func ControlUseHolding(object clonk, ix, iy)
{
var angle = Angle(0,0,ix,iy-MuskOffset);
angle = Normalize(angle,-180);
clonk->SetAimPosition(angle);
return true;
}
public func ControlUseCancel(object clonk, int x, int y)
{
clonk->CancelAiming(this);
return true;
}
public func ControlUseStop(object clonk, ix, iy)
{
holding = false;
clonk->StopAim();
return true;
}
public func Reset(clonk)
{
is_aiming = false;
}
func FireWeapon(object clonk, int angle)
{
// calculate offset for shot and effects
var IX=Sin(180-angle,MuskFront);
var IY=Cos(180-angle,MuskUp)+MuskOffset;
if(Abs(Normalize(angle,-180)) > 90)
IY=Cos(180-angle,MuskDown)+MuskOffset;
var shot = Contents(0)->TakeObject();
shot->Launch(clonk, angle, iBarrel, 200, IX, IY);
loaded = false;
SetProperty("PictureTransformation",Trans_Mul(Trans_Translate(1500,0,-1500),Trans_Rotate(170,0,1,0),Trans_Rotate(30,0,0,1)));
Sound("Objects::Weapons::Musket::GunShoot?");
// Muzzle Flash & gun smoke
var x = Sin(angle, 20);
var y = -Cos(angle, 20);
CreateParticle("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
clonk->CreateMuzzleFlash(IX, IY, angle, 20);
CreateParticle("Flash", 0, 0, 0, 0, 8, Particles_Flash());
}
public func SetLoaded()
{
loaded = true;
// Change picture to indicate being loaded.
this.PictureTransformation = Trans_Mul(Trans_Translate(500,1000,-000),Trans_Rotate(130,0,1,0),Trans_Rotate(20,0,0,1));
return;
}
public func IsLoaded() { return loaded; }
/*-- Production --*/
public func IsWeapon() { return true; }
public func IsArmoryProduct() { return true; }
/*-- Display --*/
public func GetCarryMode(object clonk, bool idle, bool nohand)
{
if (idle || nohand)
return CARRY_Back;
return CARRY_Musket;
}
public func GetCarrySpecial(clonk)
{
if (is_aiming) return "pos_hand2";
}
public func GetCarryTransform()
{
return Trans_Rotate(90, 1, 0, 0);
}
func Definition(def) {
SetProperty("PictureTransformation",Trans_Mul(Trans_Translate(1500,0,-1500),Trans_Rotate(170,0,1,0),Trans_Rotate(30,0,0,1)),def);
}
/*-- Properties --*/
local Name = "$Name$";
local Description = "$Description$";
local Collectible = true;
local ForceFreeHands = true;
local Components = {Wood = 1, Metal = 2};

View File

@ -1,2 +0,0 @@
Name=Muskete
Description=Feuerwaffe. Die Muskete benötigt Bleikugeln als Munition. Ziele und schieße mit [Benutzen]. Die Muskete benötigt Bleikugeln als Munition.

View File

@ -1,2 +0,0 @@
Name=Musket
Description=Firearm. The musket needs lead shot for ammunition. Aim and shoot with [Use]. The musket needs lead shot for ammunition.

View File

@ -92,7 +92,7 @@ private func FireBullet(object ammo)
var shot = ammo->TakeObject();
var angle = this->GetR();
shot->Launch(this, angle, 35, 200);
Sound("Objects::Weapons::Musket::GunShoot?");
Sound("Objects::Weapons::Blunderbuss::GunShoot?");
// Muzzle Flash & gun smoke
var IX = Sin(GetR(), 30);

View File

@ -101,9 +101,9 @@ private func InitMaterials(int amount)
var chest = CreateObjectAbove(Chest, pos.x, pos.y);
chest->CreateContents(Dynamite, 4);
chest->CreateContents(Club, 4);
chest->CreateContents(Musket)->CreateContents(LeadBullet);
chest->CreateContents(Musket)->CreateContents(LeadBullet);
chest->CreateContents(Musket)->CreateContents(LeadBullet);
chest->CreateContents(Blunderbuss)->CreateContents(LeadBullet);
chest->CreateContents(Blunderbuss)->CreateContents(LeadBullet);
chest->CreateContents(Blunderbuss)->CreateContents(LeadBullet);
chest->CreateContents(IronBomb, 4);
chest->CreateContents(GrenadeLauncher)->CreateContents(IronBomb);
chest->CreateContents(GrenadeLauncher)->CreateContents(IronBomb);
@ -113,7 +113,7 @@ private func InitMaterials(int amount)
chest->CreateContents(WallKit);
}
// Load all weapons in the chests.
for (var weapon in FindObjects(Find_Or(Find_ID(Musket), Find_ID(GrenadeLauncher))))
for (var weapon in FindObjects(Find_Or(Find_ID(Blunderbuss), Find_ID(GrenadeLauncher))))
weapon->SetLoaded();
// Place some catapults.
for (var count = 0; count < amount / 4; count++)

View File

@ -130,10 +130,10 @@ global func Test2_OnFinished()
global func Test3_OnStart(int plr)
{
CreateEnemy(Clonk, 120, 258, script_enemy1, [Musket, LeadBullet, Sword], 50);
CreateEnemy(Clonk, 120, 258, script_enemy1, [Blunderbuss, LeadBullet, Sword], 50);
CreateEnemy(Clonk, 392, 258, script_enemy2, [Sword, Bow, Arrow], 50);
// Log what the test is about.
Log("AI battle: musket vs. bow.");
Log("AI battle: blunderbuss vs. bow.");
return true;
}

View File

@ -130,7 +130,7 @@ func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam)
var clonk = GetCrew(iPlr);
clonk->SetPosition(425, 498);
clonk->DoEnergy(100000);
clonk->CreateContents(Musket);
clonk->CreateContents(Blunderbuss);
clonk->CreateContents(LeadBullet);
clonk->CreateContents(GrappleBow);
clonk->CreateContents(Bow);

View File

@ -400,17 +400,17 @@ global func Test14_OnStart(object victim, object killer, object fake_killer)
return true;
}
global func Test15_Log() { return "K shoots with the musket at V"; }
global func Test15_Log() { return "K shoots with the blunderbuss at V"; }
global func Test15_OnStart(object victim, object killer, object fake_killer)
{
victim->SetPosition(240, 150);
victim->DoEnergy(-45);
var musket = killer->CreateContents(Musket);
musket->CreateContents(LeadBullet);
musket.loaded = true;
musket->ControlUseStart(killer, 20, -8);
musket->ControlUseStop(killer, 20, -8);
var blunderbuss = killer->CreateContents(Blunderbuss);
blunderbuss->CreateContents(LeadBullet);
blunderbuss.loaded = true;
blunderbuss->ControlUseStart(killer, 20, -8);
blunderbuss->ControlUseStop(killer, 20, -8);
return true;
}
@ -453,18 +453,18 @@ global func Test18_OnStart(object victim, object killer, object fake_killer)
return true;
}
global func Test19_Log() { return "K ignites powder keg (musket shot) near V"; }
global func Test19_Log() { return "K ignites powder keg (blunderbuss shot) near V"; }
global func Test19_OnStart(object victim, object killer, object fake_killer)
{
victim->SetPosition(250, 150);
victim->DoEnergy(-45);
CreateObject(PowderKeg, 240, 140);
var musket = killer->CreateContents(Musket);
musket->CreateContents(LeadBullet);
musket.loaded = true;
musket->ControlUseStart(killer, 20, -8);
musket->ControlUseStop(killer, 20, -8);
var blunderbuss = killer->CreateContents(Blunderbuss);
blunderbuss->CreateContents(LeadBullet);
blunderbuss.loaded = true;
blunderbuss->ControlUseStart(killer, 20, -8);
blunderbuss->ControlUseStop(killer, 20, -8);
return true;
}
@ -600,11 +600,11 @@ global func Test28_OnStart(object victim, object killer, object fake_killer)
var balloon = victim->CreateContents(Balloon);
balloon->ControlUseStart(victim);
var musket = killer->CreateContents(Musket);
musket->CreateContents(LeadBullet);
musket.loaded = true;
musket->ControlUseStart(killer, victim->GetX() - killer->GetX(), victim->GetY() - killer->GetY());
musket->ControlUseStop(killer, victim->GetX() - killer->GetX(), victim->GetY() - killer->GetY());
var blunderbuss = killer->CreateContents(Blunderbuss);
blunderbuss->CreateContents(LeadBullet);
blunderbuss.loaded = true;
blunderbuss->ControlUseStart(killer, victim->GetX() - killer->GetX(), victim->GetY() - killer->GetY());
blunderbuss->ControlUseStop(killer, victim->GetX() - killer->GetX(), victim->GetY() - killer->GetY());
return true;
}
@ -618,11 +618,11 @@ global func Test29_OnStart(object victim, object killer, object fake_killer)
var balloon = victim->CreateContents(Balloon);
balloon->ControlUseStart(victim);
var musket = killer->CreateContents(Musket);
musket->CreateContents(LeadBullet);
musket.loaded = true;
musket->ControlUseStart(killer, victim->GetActionTarget()->GetX() - killer->GetX(), victim->GetActionTarget()->GetY() - killer->GetY());
musket->ControlUseStop(killer, victim->GetActionTarget()->GetX() - killer->GetX(), victim->GetActionTarget()->GetY() - killer->GetY());
var blunderbuss = killer->CreateContents(Blunderbuss);
blunderbuss->CreateContents(LeadBullet);
blunderbuss.loaded = true;
blunderbuss->ControlUseStart(killer, victim->GetActionTarget()->GetX() - killer->GetX(), victim->GetActionTarget()->GetY() - killer->GetY());
blunderbuss->ControlUseStop(killer, victim->GetActionTarget()->GetX() - killer->GetX(), victim->GetActionTarget()->GetY() - killer->GetY());
return true;
}
@ -736,18 +736,18 @@ global func Test36_OnStart(object victim, object killer, object fake_killer)
return true;
}
global func Test37_Log() { return "K ignites boompack (musket shot) which shoots at V"; }
global func Test37_Log() { return "K ignites boompack (blunderbuss shot) which shoots at V"; }
global func Test37_OnStart(object victim, object killer, object fake_killer)
{
victim->SetPosition(280, 150);
victim->DoEnergy(-45);
CreateObject(Boompack, 240, 146)->SetR(90);
var musket = killer->CreateContents(Musket);
musket->CreateContents(LeadBullet);
musket.loaded = true;
musket->ControlUseStart(killer, 20, -7);
musket->ControlUseStop(killer, 20, -7);
var blunderbuss = killer->CreateContents(Blunderbuss);
blunderbuss->CreateContents(LeadBullet);
blunderbuss.loaded = true;
blunderbuss->ControlUseStart(killer, 20, -7);
blunderbuss->ControlUseStop(killer, 20, -7);
return true;
}
@ -780,11 +780,11 @@ global func Test39_OnStart(object victim, object killer, object fake_killer)
airship->DoDamage(20);
victim->SetPosition(330, 150);
var musket = killer->CreateContents(Musket);
musket->CreateContents(LeadBullet);
musket.loaded = true;
musket->ControlUseStart(killer, airship->GetX() - killer->GetX(), airship->GetY() - killer->GetY() - 12);
musket->ControlUseStop(killer, airship->GetX() - killer->GetX(), airship->GetY() - killer->GetY() - 12);
var blunderbuss = killer->CreateContents(Blunderbuss);
blunderbuss->CreateContents(LeadBullet);
blunderbuss.loaded = true;
blunderbuss->ControlUseStart(killer, airship->GetX() - killer->GetX(), airship->GetY() - killer->GetY() - 12);
blunderbuss->ControlUseStop(killer, airship->GetX() - killer->GetX(), airship->GetY() - killer->GetY() - 12);
return true;
}

View File

@ -126,7 +126,7 @@ func StartMultipleListTest()
};
GuiAddCloseButton(menu, Scenario, "CloseCurrentMenu");
var inventory = [[Sword, Axe, Club], [IronBomb, Dynamite, Boompack, Firestone], [Bow, Musket, Javelin], [Shield, Bread, Sproutberry, CookedMushroom]];
var inventory = [[Sword, Axe, Club], [IronBomb, Dynamite, Boompack, Firestone], [Bow, Blunderbuss, Javelin], [Shield, Bread, Sproutberry, CookedMushroom]];
var x = ["0%", "50%", "0%", "50%"], y = ["0%", "0%", "50%", "50%"], w = ["50%", "100%", "50%", "100%"], h = ["50%", "50%", "100%", "100%"];
for (var i = 0; i < 4; ++i)
{

View File

@ -1506,33 +1506,33 @@ global func Test22_Execute()
var passed = true;
Log("****** Muskets with various contents");
Log("****** Blunderbusses with various contents");
var musket_a = CreateObject(Musket);
var musket_b = CreateObject(Musket);
var musket_c = CreateObject(Musket);
var musket_d = CreateObject(Musket);
var musket_e = CreateObject(Musket);
var blunderbuss_a = CreateObject(Blunderbuss);
var blunderbuss_b = CreateObject(Blunderbuss);
var blunderbuss_c = CreateObject(Blunderbuss);
var blunderbuss_d = CreateObject(Blunderbuss);
var blunderbuss_e = CreateObject(Blunderbuss);
musket_a->CreateContents(LeadBullet);
musket_b->CreateContents(LeadBullet);
musket_c->CreateContents(LeadBullet)->SetStackCount(7);
musket_d->CreateContents(LeadBullet)->SetInfiniteStackCount();
blunderbuss_a->CreateContents(LeadBullet);
blunderbuss_b->CreateContents(LeadBullet);
blunderbuss_c->CreateContents(LeadBullet)->SetStackCount(7);
blunderbuss_d->CreateContents(LeadBullet)->SetInfiniteStackCount();
passed &= doTest("Musket with 8 shots can be stacked with musket with 8 shots. Got %v, expected %v.", musket_a->CanBeStackedWith(musket_b), true);
passed &= doTest("Musket with 8 shots cannot be stacked with musket with 7 shots. Got %v, expected %v.", musket_a->CanBeStackedWith(musket_c), false);
passed &= doTest("Musket with 8 shots cannot be stacked with musket with infinite shots. Got %v, expected %v.", musket_a->CanBeStackedWith(musket_d), false);
passed &= doTest("Musket with 8 shots cannot be stacked with empty musket. Got %v, expected %v.", musket_a->CanBeStackedWith(musket_e), false);
passed &= doTest("Blunderbusses with 8 shots can be stacked with blunderbuss with 8 shots. Got %v, expected %v.", blunderbuss_a->CanBeStackedWith(blunderbuss_b), true);
passed &= doTest("Blunderbusses with 8 shots cannot be stacked with blunderbuss with 7 shots. Got %v, expected %v.", blunderbuss_a->CanBeStackedWith(blunderbuss_c), false);
passed &= doTest("Blunderbusses with 8 shots cannot be stacked with blunderbuss with infinite shots. Got %v, expected %v.", blunderbuss_a->CanBeStackedWith(blunderbuss_d), false);
passed &= doTest("Blunderbusses with 8 shots cannot be stacked with empty blunderbuss. Got %v, expected %v.", blunderbuss_a->CanBeStackedWith(blunderbuss_e), false);
passed &= doTest("Musket with 7 shots cannot be stacked with musket with 8 shots. Got %v, expected %v.", musket_e->CanBeStackedWith(musket_a), false);
passed &= doTest("Musket with infinite shots cannot be stacked with musket with 8 shots. Got %v, expected %v.", musket_d->CanBeStackedWith(musket_a), false);
passed &= doTest("Empty musket cannot be stacked with musket with 8 shots. Got %v, expected %v.", musket_e->CanBeStackedWith(musket_a), false);
passed &= doTest("Blunderbusses with 7 shots cannot be stacked with blunderbuss with 8 shots. Got %v, expected %v.", blunderbuss_e->CanBeStackedWith(blunderbuss_a), false);
passed &= doTest("Blunderbusses with infinite shots cannot be stacked with blunderbuss with 8 shots. Got %v, expected %v.", blunderbuss_d->CanBeStackedWith(blunderbuss_a), false);
passed &= doTest("Empty blunderbuss cannot be stacked with blunderbuss with 8 shots. Got %v, expected %v.", blunderbuss_e->CanBeStackedWith(blunderbuss_a), false);
if (musket_a) musket_a->RemoveObject();
if (musket_b) musket_b->RemoveObject();
if (musket_c) musket_c->RemoveObject();
if (musket_d) musket_d->RemoveObject();
if (musket_e) musket_e->RemoveObject();
if (blunderbuss_a) blunderbuss_a->RemoveObject();
if (blunderbuss_b) blunderbuss_b->RemoveObject();
if (blunderbuss_c) blunderbuss_c->RemoveObject();
if (blunderbuss_d) blunderbuss_d->RemoveObject();
if (blunderbuss_e) blunderbuss_e->RemoveObject();
Log("****** Grenade launcher with various contents");

View File

@ -4,7 +4,7 @@
public func Dlg_Lookout_Init(object clonk)
{
clonk->CreateContents(Musket);
clonk->CreateContents(Blunderbuss);
return true;
}
@ -22,7 +22,7 @@ public func Dlg_Lookout_2(object clonk)
public func Dlg_Lookout_3(object clonk)
{
MessageBox("$DlgLookoutMusket$", clonk, clonk);
MessageBox("$DlgLookoutBlunderbuss$", clonk, clonk);
return true;
}

View File

@ -32,7 +32,7 @@ DlgFarmerRebuild=Das tue ich!
# Dialogue: Lookout
DlgLookoutHello=Hallo, warum stehst du hier oben?
DlgLookoutProtecting=Dies ist mein Posten. Ich halte Ausschau, für den Fall, dass die dunkle Fraktion wieder angreift.
DlgLookoutMusket=Trägst du deshalb die Muskete?
DlgLookoutBlunderbuss=Trägst du deshalb die Donnerbüchse?
DlgLookoutNoChance=Ja, aber ich denke nicht, dass ich gegen diese Typen eine Chance habe.
DlgLookoutNoShow=Dann lass uns hoffen, dass sie nicht wiederkommen!

View File

@ -32,7 +32,7 @@ DlgFarmerRebuild=I am!
# Dialogue: Lookout
DlgLookoutHello=Hello, why are you standing over here?
DlgLookoutProtecting=I am on the lookout for attacks from the evil faction.
DlgLookoutMusket=Is that why you are carrying a musket?
DlgLookoutBlunderbuss=Is that why you are carrying a blunderbuss?
DlgLookoutNoChance=Yes, but I don't think I have any chance against those evil guys.
DlgLookoutNoShow=Then let's hope they don't come again.

View File

@ -4,7 +4,7 @@
public func Dlg_Lookout_Init(object clonk)
{
clonk->CreateContents(Musket);
clonk->CreateContents(Blunderbuss);
return true;
}

View File

@ -45,13 +45,13 @@ public func Outro_Init(int for_plr)
this.henchman1->Enter(this.airplane1);
this.henchman1->SetAction("Walk");
this.henchman1->SetColor(0xff000000);
this.henchman1->CreateContents(Musket)->CreateContents(LeadBullet);
this.henchman1->CreateContents(Blunderbuss)->CreateContents(LeadBullet);
this.henchman2 = CreateObject(Clonk);
this.henchman2->SetAlternativeSkin("Leather");
this.henchman2->Enter(this.airplane2);
this.henchman2->SetAction("Walk");
this.henchman2->SetColor(0xff000000);
this.henchman2->CreateContents(Musket)->CreateContents(LeadBullet);
this.henchman2->CreateContents(Blunderbuss)->CreateContents(LeadBullet);
// Another henchman which will control the lookout.
this.henchman3 = CreateObject(Clonk);
@ -59,7 +59,7 @@ public func Outro_Init(int for_plr)
this.henchman3->Enter(this.airplane2);
this.henchman3->SetAction("Walk");
this.henchman3->SetColor(0xff000000);
this.henchman3->CreateContents(Musket)->CreateContents(LeadBullet);
this.henchman3->CreateContents(Blunderbuss)->CreateContents(LeadBullet);
// The faction leader which will do the talking.
this.leader = CreateObject(Clonk);
@ -68,7 +68,7 @@ public func Outro_Init(int for_plr)
this.leader->Enter(this.airplane1);
this.leader->SetAction("Walk");
this.leader->SetColor(0xff000000);
this.leader->CreateContents(Musket)->CreateContents(LeadBullet);
this.leader->CreateContents(Blunderbuss)->CreateContents(LeadBullet);
// There is also a kidnapper on an airship with a lorry to collect the wipfs.
// The third henchman shoots down the balloons.
@ -133,10 +133,10 @@ public func Outro_4()
balloon->ControlUseStart(this.henchman2);
this.henchman2->GetActionTarget()->ControlDown(this.henchman2);
// Let henchmen aim at the farmer.
AddEffect("AimMusketAt", this.henchman1, 100, 1, this, nil, this.farmer, 356);
AddEffect("AimMusketAt", this.henchman2, 100, 1, this, nil, this.farmer, 356);
AddEffect("AimBlunderbussAt", this.henchman1, 100, 1, this, nil, this.farmer, 356);
AddEffect("AimBlunderbussAt", this.henchman2, 100, 1, this, nil, this.farmer, 356);
// Let leader aim at the village head.
AddEffect("AimMusketAt", this.leader, 100, 1, this, nil, this.village_head);
AddEffect("AimBlunderbussAt", this.leader, 100, 1, this, nil, this.village_head);
return ScheduleNext(78);
}
@ -154,7 +154,7 @@ public func Outro_5()
public func Outro_6()
{
// Third henchman aims at lookout
AddEffect("AimMusketAt", this.henchman3, 100, 1, this, nil, this.lookout, 280);
AddEffect("AimBlunderbussAt", this.henchman3, 100, 1, this, nil, this.lookout, 280);
return ScheduleNext(100);
}
@ -172,7 +172,7 @@ public func Outro_8()
public func Outro_9()
{
// Third henchman tells lookout to drop the weapon.
this.henchman3->Message("$MsgHenchman3DropMusket$");
this.henchman3->Message("$MsgHenchman3DropBlunderbuss$");
return ScheduleNext(18);
}
@ -285,7 +285,7 @@ public func Outro_19()
ScheduleCall(this.henchman1, "RemoveObject", 120, 0);
ScheduleCall(boompack, "RemoveObject", 120, 0);
RemoveEffect("AimMusketAt", this.leader);
RemoveEffect("AimBlunderbussAt", this.leader);
return ScheduleNext(36);
}
@ -325,31 +325,31 @@ public func Outro_Stop()
/*-- Effects --*/
public func FxAimMusketAtStart(object target, proplist effect, int temp, object aim, int length)
public func FxAimBlunderbussAtStart(object target, proplist effect, int temp, object aim, int length)
{
if (temp)
return FX_OK;
effect.aim_target = aim;
effect.aim_length = length;
effect.musket = FindObject(Find_ID(Musket), Find_Container(target));
effect.musket.loaded = true;
effect.musket->ControlUseStart(target, effect.aim_target->GetX() - target->GetX(), effect.aim_target->GetY() - target->GetY());
effect.blunderbuss = FindObject(Find_ID(Blunderbuss), Find_Container(target));
effect.blunderbuss.loaded = true;
effect.blunderbuss->ControlUseStart(target, effect.aim_target->GetX() - target->GetX(), effect.aim_target->GetY() - target->GetY());
return FX_OK;
}
public func FxAimMusketAtTimer(object target, proplist effect, int time)
public func FxAimBlunderbussAtTimer(object target, proplist effect, int time)
{
effect.musket->ControlUseHolding(target, effect.aim_target->GetX() - target->GetX(), effect.aim_target->GetY() - target->GetY());
effect.blunderbuss->ControlUseHolding(target, effect.aim_target->GetX() - target->GetX(), effect.aim_target->GetY() - target->GetY());
if (effect.aim_length != nil && time >= effect.aim_length)
return FX_Execute_Kill;
return FX_OK;
}
public func FxAimMusketAtStop(object target, proplist effect, int reason, bool temp)
public func FxAimBlunderbussAtStop(object target, proplist effect, int reason, bool temp)
{
if (temp)
return FX_OK;
effect.musket->ControlUseCancel(target, effect.aim_target->GetX() - target->GetX(), effect.aim_target->GetY() - target->GetY());
effect.blunderbuss->ControlUseCancel(target, effect.aim_target->GetX() - target->GetX(), effect.aim_target->GetY() - target->GetY());
return FX_OK;
}
@ -419,14 +419,16 @@ public func FxMoveAirshipToWipfTimer(object target, proplist effect, int time)
if (Abs(this.airship->GetX() - right_wipf->GetX()) < 8)
{
this.airship->ControlStop(this.kidnapper);
// Shoot musket.
// Shoot blunderbuss.
if (!right_wipf.shot)
{
var musket = FindObject(Find_ID(Musket), Find_Container(this.henchman3));
musket.loaded = true;
musket->ControlUseStart(target, right_wipf->GetX() - this.henchman3->GetX(), right_wipf->GetY() - this.henchman3->GetY() - 24);
musket->ControlUseHolding(target, right_wipf->GetX() - this.henchman3->GetX(), right_wipf->GetY() - this.henchman3->GetY() - 24);
musket->ControlUseStop(target, right_wipf->GetX() - this.henchman3->GetX(), right_wipf->GetY() - this.henchman3->GetY() - 24);
var blunderbuss = FindObject(Find_ID(Blunderbuss), Find_Container(this.henchman3));
blunderbuss.BulletsPerShot = 1;
blunderbuss.BulletSpread = 0;
blunderbuss.loaded = true;
blunderbuss->ControlUseStart(target, right_wipf->GetX() - this.henchman3->GetX(), right_wipf->GetY() - this.henchman3->GetY() - 24);
blunderbuss->ControlUseHolding(target, right_wipf->GetX() - this.henchman3->GetX(), right_wipf->GetY() - this.henchman3->GetY() - 24);
blunderbuss->ControlUseStop(target, right_wipf->GetX() - this.henchman3->GetX(), right_wipf->GetY() - this.henchman3->GetY() - 24);
right_wipf.shot = true;
}
return FX_OK;

View File

@ -49,7 +49,7 @@ MsgEvilLeaderBegging=Ach, du Kleinkind. Betteln hilft dir nicht, meine Leute sin
MsgEvilLeaderBye=Gut, wir sind hier fertig. Sagt euren Tierchen auf Wiedersehen...muhaha
# Sequence: Outro messages
MsgHenchman3DropMusket=Lass die Muskete fallen!
MsgHenchman3DropBlunderbuss=Lass die Donnerbüchse fallen!
MsgLookoutSurrender=Ich gebe auf!
MsgHenchman1RunGirl=Verschwinde Mädchen oder wir schießen!
MsgHenchman2Wipfs=Eure Wipfe gehören uns, muhaha.

View File

@ -49,7 +49,7 @@ MsgEvilLeaderBegging=Oh little kid, begging is useless, my men are not prone to
MsgEvilLeaderBye=Okay, we are done here. Time to say goodbye to your pet friends... muhaha
# Sequence: Outro messages
MsgHenchman3DropMusket=You better drop that musket!
MsgHenchman3DropBlunderbuss=You better drop that blunderbuss!
MsgLookoutSurrender=Yes, I surrender.
MsgHenchman1RunGirl=Run girl, or we shoot!
MsgHenchman2Wipfs=Your wipfs are ours now, muhaha.

View File

@ -69,10 +69,10 @@ private func InitCave()
CreateObjectAbove(Torch, 500, 474)->AttachToWall(true);
CreateObjectAbove(Torch, 506, 628)->AttachToWall(true);
CreateObjectAbove(Torch, 728, 696)->AttachToWall(true);
// A hidden chest with a musket.
// A hidden chest with a blunderbuss.
var chest = CreateObjectAbove(Chest, 10, 526);
var musket = chest->CreateContents(Musket);
musket->CreateContents(LeadBullet);
var blunderbuss = chest->CreateContents(Blunderbuss);
blunderbuss->CreateContents(LeadBullet);
return;
}

View File

@ -87,7 +87,7 @@ global func GivePlayerWeaponryKnowledge(int plr)
// Armory to construct the weapons.
Armory,
// Weapons and explosives.
Bow, Arrow, FireArrow, BombArrow, Club, Sword, Javelin, Shield, Musket, LeadBullet, IronBomb, GrenadeLauncher, PowderKeg,
Bow, Arrow, FireArrow, BombArrow, Club, Sword, Javelin, Shield, Blunderbuss, LeadBullet, IronBomb, GrenadeLauncher, PowderKeg,
// Artillery vehicles.
Catapult, Cannon
];