Skip to content

Commit

Permalink
monsters, messages, items
Browse files Browse the repository at this point in the history
  • Loading branch information
connect committed May 11, 2016
1 parent f88a879 commit 914ba7e
Show file tree
Hide file tree
Showing 12 changed files with 624 additions and 191 deletions.
6 changes: 3 additions & 3 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

var cfg = {
mod : 'doom.wad',
screenmode : '1024x768',
screenmode : '800x600',
fullscreen : 0,
playerHeight : 45,
musicvolume : 0.5,
noclip : 1,
musicvolume : 0,
noclip : 0,
gl_light : 0,

bind: {
Expand Down
87 changes: 55 additions & 32 deletions doom.wad/ammo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,71 +5,94 @@
* @author kod.connect
*/

o_.ammo = {
o_.ammo = new function(){

bullets: {
var t = this;

t.onPickup = function(item){

return t[item].message;
};

t.bullets = {
capacity : 200,
damageMin : 5,
damageMax : 15
},
};

shells: {
t.shells = {
capacity : 50,
damageMin : 5,
damageMax : 15
},
};

rockets: {
t.rockets = {
capacity : 50,
damageMin : 20,
damageMax : 160
},
};

cells: {
t.cells = {
capacity : 50,
damageMin : 5,
damageMax : 40
},
};

////////////////////////////////////////////////////////////////////////////

clip: {
t.clip = {
thing : 2007,
ammotype : 'bullets',
capacity : 10
},
capacity : 10,
message : u_.msg.GOTCLIP
};

boxofbullets: {
t.boxofammo = {
thing : 2048,
ammotype : 'bullets',
capacity : 50
},
capacity : 50,
message : u_.msg.GOTCLIPBOX
};

shotgunshells: {
t.shotgunshells = {
thing : 2008,
ammotype : 'shells',
capacity : 4
},
capacity : 4,
message : u_.msg.GOTSHELLS
};

boxofshells: {
t.boxofshells = {
thing : 2049,
ammotype : 'shells',
capacity : 20
},
capacity : 20,
message : u_.msg.GOTSHELLBOX
};

rocket: {
t.rocket = {
thing : 2010,
ammotype : 'rockets',
capacity : 1
},
capacity : 1,
message : u_.msg.GOTROCKET
};

boxofrockets: {
t.boxofrockets = {
thing : 2046,
ammotype : 'rockets',
capacity : 5
},
capacity : 5,
message : u_.msg.GOTROCKBOX
};

energycell: {
t.energycell = {
thing : 2047,
ammotype : 'cells',
capacity : 20
},
capacity : 20,
message : u_.msg.GOTCELL
};

energypack: {
t.energypac = {
thing : 17,
ammotype : 'cells',
capacity : 100
capacity : 100,
message : u_.msg.GOTCELLBOX
}
};
75 changes: 71 additions & 4 deletions doom.wad/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,75 @@

u_.msg = {

got_ : 'You got %item%',
give_all : 'You got all weapons',
noclip_on : 'Noclip: on',
noclip_off : 'Noclip: off'
GOTANY : "Picked up %item%",
GOTUNKNWN : "Unknown item: %item%",

GOTARMOR : "Picked up the armor.",
GOTMEGA : "Picked up the MegaArmor!",
GOTHTHBONUS : "Picked up a health bonus.",
GOTARMBONUS : "Picked up an armor bonus.",
GOTSTIM : "Picked up a stimpack.",
GOTMEDINEED : "Picked up a medikit that you REALLY need!",
GOTMEDIKIT : "Picked up a medikit.",
GOTSUPER : "Supercharge!",

GOTBLUECARD : "Picked up a blue keycard.",
GOTYELWCARD : "Picked up a yellow keycard.",
GOTREDCARD : "Picked up a red keycard.",
GOTBLUESKUL : "Picked up a blue skull key.",
GOTYELWSKUL : "Picked up a yellow skull key.",
GOTREDSKULL : "Picked up a red skull key.",

GOTINVUL : "Invulnerability!",
GOTBERSERK : "Berserk!",
GOTINVIS : "Partial Invisibility",
GOTSUIT : "Radiation Shielding Suit",
GOTMAP : "Computer Area Map",
GOTVISOR : "Light Amplification Visor",
GOTMSPHERE : "MegaSphere!",

GOTCLIP : "Picked up a clip.",
GOTCLIPBOX : "Picked up a box of bullets.",
GOTROCKET : "Picked up a rocket.",
GOTROCKBOX : "Picked up a box of rockets.",
GOTCELL : "Picked up an energy cell.",
GOTCELLBOX : "Picked up an energy cell pack.",
GOTSHELLS : "Picked up 4 shotgun shells.",
GOTSHELLBOX : "Picked up a box of shotgun shells.",
GOTBACKPACK : "Picked up a backpack full of ammo!",

GOTBFG9000 : "You got the BFG9000! Oh, yes.",
GOTCHAINGUN : "You got the chaingun!",
GOTCHAINSAW : "A chainsaw! Find some meat!",
GOTLAUNCHER : "You got the rocket launcher!",
GOTPLASMA : "You got the plasma gun!",
GOTSHOTGUN : "You got the shotgun!",
GOTSHOTGUN2 : "You got the super shotgun!",

//
// DOORS
//
PD_BLUEO : "You need a blue key to activate this object",
PD_REDO : "You need a red key to activate this object",
PD_YELLOWO : "You need a yellow key to activate this object",
PD_BLUEK : "You need a blue key to open this door",
PD_REDK : "You need a red key to open this door",
PD_YELLOWK : "You need a yellow key to open this door",

//
// ST Stuff
//
STSTR_KFAADDED : "Very Happy Ammo Added",
STSTR_FAADDED : "Ammo (no keys) Added",

STSTR_NCON : "No Clipping Mode ON",
STSTR_NCOFF : "No Clipping Mode OFF",

STSTR_BEHOLD : "inVuln, Str, Inviso, Rad, Allmap, or Lite-amp",
STSTR_BEHOLDX : "Power-up Toggled",

STSTR_CHOPPERS : "... doesn't suck - GM",
STSTR_CLEV :"Changing Level...",


};
17 changes: 15 additions & 2 deletions doom.wad/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ o_.map.loaded = function(){
r_.drawFalloff();

// @FIXME debug only, remove later
c_.give('all') // cheat
c_.give('all'); // cheat

c_.noclip();
};


Expand All @@ -52,10 +54,21 @@ o_.map.add([
'e3m3'
]);

o_.dropLoot = function(o){

var thing = o_.things[ o.type ];

if (thing.drop != undefined){

r_.spawnThing(thing.drop, o.position.x, o.position.z, o.position.y );
}
};

o_.modules = [
'ammo',
'things',
'weapons'
'weapons',
'powerups'
];

for (var m in o_.modules) {
Expand Down
Loading

0 comments on commit 914ba7e

Please sign in to comment.