map events and title screen
This commit is contained in:
parent
ff3ea9dcdf
commit
8e30d7fa7e
37 changed files with 730 additions and 17 deletions
|
@ -1,7 +1,8 @@
|
|||
function c_moveunit(targetunit, destination) {
|
||||
array_remove(c_gettile(targetunit.pos.x, targetunit.pos.y).contents, targetunit);
|
||||
var theguy = c_gettile(targetunit.pos.x, targetunit.pos.y);
|
||||
array_remove(theguy.contents, targetunit);
|
||||
array_push(destination.contents, targetunit);
|
||||
targetunit.pos.x = destination.x;
|
||||
targetunit.pos.y = destination.y;
|
||||
|
||||
theguy.event();
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
var forest123456 = function() {return new tiledata(u, u, [], [new statmod(st.def, 5, add)])}
|
||||
var block1234567 = function() {return new tiledata(false, u, [])}
|
||||
var recruit_tile = function() {return new tiledata(u, u, u, u, function() {})}
|
||||
global.map = c_mapgen([
|
||||
[block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), block1234567(), block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
|
||||
[block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), forest123456(), new tiledata(), new tiledata(), block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
|
||||
|
@ -27,11 +28,12 @@ function c_informtiles() {
|
|||
c_informtiles();
|
||||
global.tilesize = new vec2(20, 20);
|
||||
|
||||
function tiledata(passable_=true, contents_=[], overlays_=[], statmods=[]) constructor {
|
||||
function tiledata(passable_=true, contents_=[], overlays_=[], statmods=[], event_=c_null) constructor {
|
||||
passable = passable_;
|
||||
contents = contents_;
|
||||
overlays = overlays_;
|
||||
modifiers = {};
|
||||
event = event_;
|
||||
var i;
|
||||
for (i=0; i<array_length(statmods); i++) {
|
||||
modifiers[$statmods[i].name] = statmods[i];
|
||||
|
|
|
@ -43,7 +43,7 @@ nu weapon("Microlaser", "special science laser instead of magic!", WPTYPE.SWORD,
|
|||
nu weapon("Wrench", "a wrench of a common material", WPTYPE.SWORD, [new statmod(st.str, 9, add), new statmod(st.hit, 60, add)]);
|
||||
|
||||
nu weapon("Bayonet", "it's out of ammo...", WPTYPE.SWORD, [new statmod(st.str, 9, add), new statmod(st.hit, 80, add)]);
|
||||
nu weapon("", "", WPTYPE.SWORD, [new statmod(st.str, 6, add), new statmod(st.hit, 90, add)]);
|
||||
nu weapon("Rifle", "", WPTYPE.SWORD, [new statmod(st.str, 6, add), new statmod(st.hit, 90, add)]);
|
||||
nu weapon("", "", WPTYPE.SWORD, [new statmod(st.str, 6, add), new statmod(st.hit, 90, add)]);
|
||||
nu weapon("", "", WPTYPE.SWORD, [new statmod(st.str, 6, add), new statmod(st.hit, 90, add)]);
|
||||
nu weapon("", "", WPTYPE.SWORD, [new statmod(st.str, 6, add), new statmod(st.hit, 90, add)]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue