Skip to content
Permalink
Browse files

Shishkebab (New Melee Weapon)

With all the fancy new bows and exotic firearms being added lately, I
thought we needed something new and exciting in the way of melee
weapons.  So we give you the "Shishkebab"!  Essentially the same as the
weapon of the same name in Fallout 3, this is a makeshift machete that
has been combined with a crude flamethrower to make a primitive flaming
sword.  It's not incredibly powerful, but it's fairly simple to make.
It also functions as a torch and a lighter when it's turned on, and can
be used as a knife like any other edged weapon when off.  I'm thinking
of making some more powerful and difficult to build versions based on
the stronger melee weapons (machete, broadsword, and katana), but first
I'd like to see if there would be any interest in adding this to the
game.

Tested and works

Note: This isn't my idea; I saw it in a post on the forums by Inquisitor
Dust and thought I'd see how hard it would be to do the hard-coded
actions for it.  It came out so well I thought I'd post it and see what
other people thought of it, and it includes too many files to easily
post on the forums.
  • Loading branch information...
NaturesWitness committed Aug 4, 2013
1 parent c7b231d commit 411b1651a2b575c8a7916a9bc8e5c546f09cb8bc
Showing with 148 additions and 0 deletions.
  1. +50 −0 data/raw/items/tools.json
  2. +25 −0 data/raw/recipes.json
  3. +2 −0 item_factory.cpp
  4. +64 −0 iuse.cpp
  5. +2 −0 iuse.h
  6. +5 −0 player.cpp
@@ -2666,6 +2666,56 @@
"use_action": "KNIFE"
},

{
"id": "shishkebab_off",
"type": "TOOL",
"symbol": "/",
"color": "light_gray",
"name": "Shishkebab (off)",
"description": "A large blade with a fuel pipe on the side, and a small tank and igniter built into the insulated hilt. When filled with gasoline, the blade can be set on fire to scorch enemies, light your way, or just to look like a badass.",
"rarity": 0,
"price": 100,
"material": ["iron", "plastic"],
"flags": ["FIRE", "CHOP"],
"weight": 16,
"volume": 9,
"bashing": 5,
"cutting": 14,
"to_hit": 0,
"max_charges": 75,
"initial_charges": 0,
"charges_per_use": 0,
"turns_per_charge": 0,
"ammo": "gasoline",
"revert_to": "null",
"use_action": "SHISHKEBAB_OFF"
},

{
"id": "shishkebab_on",
"type": "TOOL",
"symbol": "/",
"color": "light_gray",
"name": "Shishkebab (on)",
"description": "A large blade with a fuel pipe on the side, and a small tank and igniter built into the insulated hilt. The blade is wreathed in bright red flames. Number Nine would be proud.",
"rarity": 0,
"price": 100,
"material": ["iron", "plastic"],
"techniques": "FLAMING",
"flags": ["FIRE", "CHOP"],
"weight": 16,
"volume": 9,
"bashing": 5,
"cutting": 14,
"to_hit": 0,
"max_charges": 75,
"initial_charges": 0,
"charges_per_use": 0,
"turns_per_charge": 20,
"ammo": "gasoline",
"revert_to": "null",
"use_action": "SHISHKEBAB_ON"
},
{
"id": "makeshift_halberd",
"type": "TOOL",
@@ -220,6 +220,31 @@
]
]
},


{
"result": "shishkebab_off",
"category": "CC_WEAPON",
"skill_pri": "survival",
"difficulty": 0,
"time": 10000,
"reversible": true,
"autolearn": true,
"components": [
[
["leather", 5]
],
[
["pipe", 1]
],
[
["makeshift_machete", 1]
],
[
["flamethrower_crude", 1]
]
]
},


{
@@ -101,6 +101,8 @@ void Item_factory::init(){
iuse_function_list["SIPHON"] = &iuse::siphon;
iuse_function_list["CHAINSAW_OFF"] = &iuse::chainsaw_off;
iuse_function_list["CHAINSAW_ON"] = &iuse::chainsaw_on;
iuse_function_list["SHISHKEBAB_OFF"] = &iuse::shishkebab_off;
iuse_function_list["SHISHKEBAB_ON"] = &iuse::shishkebab_on;
iuse_function_list["JACKHAMMER"] = &iuse::jackhammer;
iuse_function_list["JACQUESHAMMER"] = &iuse::jacqueshammer;
iuse_function_list["PICKAXE"] = &iuse::pickaxe;
@@ -2241,6 +2241,70 @@ void iuse::chainsaw_on(game *g, player *p, item *it, bool t)
}
}

void iuse::shishkebab_off(game *g, player *p, item *it, bool t)
{
int choice = menu(true,
_("Using Shishkebab:"), _("Turn on"), _("Use as Knife"), _("Cancel"), NULL);
switch (choice)
{
if (choice == 2)
break;
case 1:
{
p->moves -= 10;
if (rng(0, 10) - it->damage > 5 && it->charges > 0)
{
g->sound(p->posx, p->posy, 10,
_("With a hiss, the shishkebab is covered in flames!"));
it->make(g->itypes["shishkebab_on"]);
it->active = true;
}
else
g->add_msg_if_player(p,_("There is a small spark, but nothing else."));
}
break;
case 2:
{
iuse::knife(g, p, it, t);
}
}
}
void iuse::shishkebab_on(game *g, player *p, item *it, bool t)
{
if (t) // Effects while simply on
{
if (one_in(15))
g->sound(p->posx, p->posy, 5, _("Your shishkebab crackles."));
}
else
{
int choice = menu(true,
_("Using Shishkebab:"), _("Turn off"), _("Light something"), _("Cancel"), NULL);
switch (choice)
{
if (choice == 2)
break;
case 1:
{
// Toggling
g->add_msg_if_player(p,_("Your shishkebab sputters and goes out."));
it->make(g->itypes["shishkebab_off"]);
it->active = false;
}
break;
case 2:
{
int dirx, diry;
if (prep_firestarter_use(g, p, it, dirx, diry))
{
p->moves -= 15;
resolve_firestarter_use(g, p, it, dirx, diry);
}
}
}
}
}

void iuse::jackhammer(game *g, player *p, item *it, bool t)
{
int dirx, diry;
2 iuse.h
@@ -83,6 +83,8 @@ class iuse
void siphon (game *g, player *p, item *it, bool t);
void chainsaw_off (game *g, player *p, item *it, bool t);
void chainsaw_on (game *g, player *p, item *it, bool t);
void shishkebab_off (game *g, player *p, item *it, bool t);
void shishkebab_on (game *g, player *p, item *it, bool t);
void jackhammer (game *g, player *p, item *it, bool t);
void jacqueshammer (game *g, player *p, item *it, bool t);
void pickaxe (game *g, player *p, item *it, bool t);
@@ -3426,6 +3426,7 @@ float player::active_light()

int flashlight = active_item_charges("flashlight_on");
int torch = active_item_charges("torch_lit");
int shishkebab = active_item_charges("shishkebab_on");
int gasoline_lantern = active_item_charges("gasoline_lantern_on");
if (flashlight > 0)
{
@@ -3434,6 +3435,10 @@ float player::active_light()
else if (torch > 0)
{
lumination = std::min(100, torch * 5);
}
else if (shishkebab > 0)
{
lumination = std::min(100, shishkebab * 5);
}
else if (active_item_charges("pda_flashlight") > 0)
{

0 comments on commit 411b165

Please sign in to comment.
You can’t perform that action at this time.