Compare commits

..

No commits in common. "641ccd106517ff528bce3171942fd5623e48c1ac" and "80fa7e40a32335ebd54480cc7d1775eda013f54b" have entirely different histories.

18 changed files with 22 additions and 127 deletions

View File

@ -6,7 +6,6 @@
{"id":{"name":"clampneg","path":"scripts/clampneg/clampneg.yy",},"order":8,},
{"id":{"name":"array_remove","path":"scripts/array_remove/array_remove.yy",},"order":6,},
{"id":{"name":"lerp_angle","path":"scripts/lerp_angle/lerp_angle.yy",},"order":9,},
{"id":{"name":"c_getstats","path":"scripts/c_getstats/c_getstats.yy",},"order":16,},
{"id":{"name":"stat","path":"scripts/stat/stat.yy",},"order":3,},
{"id":{"name":"vlambeer","path":"scripts/vlambeer/vlambeer.yy",},"order":1,},
{"id":{"name":"x_unitsetup","path":"scripts/x_unitsetup/x_unitsetup.yy",},"order":0,},
@ -64,7 +63,6 @@
{"id":{"name":"c_input","path":"scripts/c_input/c_input.yy",},"order":8,},
{"id":{"name":"st_standing","path":"scripts/st_standing/st_standing.yy",},"order":6,},
{"id":{"name":"unit","path":"scripts/unit/unit.yy",},"order":2,},
{"id":{"name":"c_moveunit","path":"scripts/c_moveunit/c_moveunit.yy",},"order":17,},
{"id":{"name":"se_play","path":"scripts/se_play/se_play.yy",},"order":5,},
{"id":{"name":"msglang","path":"scripts/msglang/msglang.yy",},"order":15,},
{"id":{"name":"array_front","path":"scripts/array_front/array_front.yy",},"order":2,},

View File

@ -18,7 +18,7 @@
"physicsKinematic": false,
"physicsShapePoints": [],
"eventList": [
{"isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":72,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},

View File

@ -3,10 +3,7 @@ var i;
/*for (i=0; i<array_length(global.units[ARMY.US]); i++) {
c_inheritunit(2+i, 2, un.chara);
}*/
var chara = c_inheritunit(8, 5, un.chara);
c_addweapon(chara, wp.knife, false);
c_addweapon(chara, wp[$"iron sword"], true);
c_inheritunit(10, 5, un.kris);
var chara = c_inheritunit(2, 2, un.chara);
c_addweapon(chara, wp.knife, true);
c_inheritunit(3, 2, un.kris);
selectedunit = noone;
global.gw = 640;
global.gh = 360;

View File

@ -1,21 +0,0 @@
if selectedunit != noone {
draw_set_color(c_black);
draw_rectangle(global.gw, global.gh, global.gw-100, global.gh-(array_length(selectedunit.inventory)-1)*32-16, false);
draw_set_color(c_white);
var i;
draw_set_halign(fa_right);
for (i=1; i<array_length(selectedunit.inventory); i++) {
draw_text(global.gw-10, global.gh-10-i*20, (selectedunit.equippedweapon == i ? "X " : " ") + selectedunit.inventory[i].name);
}
draw_set_halign(fa_left);
var dudes = c_getstats(selectedunit);
draw_set_color(c_black);
draw_rectangle(0, 0, 100, (array_length(dudes)-1)*32+16, false);
draw_set_color(c_white);
var i;
for (i=0; i<array_length(dudes); i++) {
draw_text(10, 10+i*20, dudes[i].name + ": " + string(dudes[i].val));
}
draw_set_halign(fa_left);
}

View File

@ -14,15 +14,4 @@ if select && selectedunit == noone {
}
}
}
} else if select {
if mouse_x > global.gw-100 {
var guyhits = floor(abs(mouse_y-global.gh-10)/32);
log(guyhits, array_length(selectedunit.inventory));
if guyhits < array_length(selectedunit.inventory) {
//log("doing");
selectedunit.equippedweapon = guyhits+1;
c_equipweapon(selectedunit, selectedunit.inventory[selectedunit.equippedweapon]);
}
//draw_text(global.gw-10, global.gh-10-i*20;
}
}

View File

@ -11,7 +11,6 @@ attacked = 0;
inventory = [];
c_addweapon(id, wp.nothing);
equippedweapon = noone;
waiting = false;
continuecombat = function(me, them) {
//if stamina returnable = true stamina-- return true
@ -24,14 +23,8 @@ continuecombat = function(me, them) {
action = {
effect: function(me, them) {
if irandom(99) < (me.data.hit.val) { //add avo
them.data.hp.val -= me.data.str.val;
return me.data.str.val;
} else {
log(string(me) + " missed!");
return 0;
}
}
//animation: new actionanim()

View File

@ -1,4 +1,3 @@
if waiting image_blend = c_grey else image_blend = c_white;
draw_self();
drawstate();
//log(data);

View File

@ -1,15 +0,0 @@
function c_getstats(target) {
var dudes = variable_struct_get_names(target.data);
var lads = variable_struct_get_names(st);
var chaps = [];
var i;
for (i=0; i<array_length(dudes); i++) {
while !array_contains(lads, dudes[i]) || dudes[i] == "hp" {
array_delete(dudes, i, 1);
if i >= array_length(dudes) break;
}
if i >= array_length(dudes) break;
array_push(chaps, target.data[$dudes[i]]);
}
return chaps;
}

View File

@ -1,12 +0,0 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "Scripts",
"path": "folders/Scripts.yy",
},
"resourceVersion": "1.0",
"name": "c_getstats",
"tags": [],
"resourceType": "GMScript",
}

View File

@ -1,6 +0,0 @@
function c_moveunit(targetunit, destination) {
array_remove(c_gettile(targetunit.pos.x, targetunit.pos.y).contents, targetunit);
array_push(destination.contents, targetunit);
targetunit.pos.x = destination.x;
targetunit.pos.y = destination.y;
}

View File

@ -1,12 +0,0 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "Scripts",
"path": "folders/Scripts.yy",
},
"resourceVersion": "1.0",
"name": "c_moveunit",
"tags": [],
"resourceType": "GMScript",
}

View File

@ -1,9 +1,8 @@
function c_selectunit(unitobject) {
if unitobject.waiting return false
unitobject.state = st_moving;
unitobject.drawstate = st_movingdraw;
unitobject.returnpos = new vec2(unitobject.pos.x, unitobject.pos.y);
var mov = unitobject.data.mov.val;
var mov = 2//DONT
var i, j;
for (i=-mov; i<=mov; i++) {
for (j=-mov; j<=mov; j++) {
@ -13,7 +12,6 @@ function c_selectunit(unitobject) {
}
}
ARTICULATOR.selectedunit = unitobject;
return unitobject;
}
function c_deselectunit(unitobject) {

View File

@ -1,9 +1,9 @@
function st_moving() {
var mov = data.mov.val;
var mov = 2;
c_input();
hspd = lerp(hspd, (right-left)*.05, .4);
vspd = lerp(vspd, (down-up)*.05, .4);
if !stop dir = DIR.NONE;
//if !stop dir = DIR.NONE;
if left dir = DIR.LEFT;
if down dir = DIR.DOWN;
if up dir = DIR.UP;
@ -47,7 +47,7 @@ function st_moving() {
//var rng = [1];
var guy = c_gettile(x, y, true);
var hitting = noone;
if guy != noone && stop {
if guy != noone {
switch dir {
case DIR.LEFT:
hitting = c_gettile(guy.x-1, guy.y);
@ -96,11 +96,6 @@ function st_moving() {
if back {
c_deselectunit(id);
}
if dir == DIR.NONE && select {
c_moveunit(id, c_gettile(x, y, true));
waiting = true;
c_deselectunit(id);
}
/*if x < (pos.x-mov)*ts.x {
x = (pos.x-mov)*ts.x;
} else if x > (pos.x+mov+1)*ts.x {

View File

@ -45,5 +45,3 @@ nu stat("hp", "health", "vitality");
nu stat("str", "strength", "physical power");
nu stat("def", "defense", "physical defense");
nu stat("spd", "speed", "avoid and follow-up");
nu stat("hit", "hit rate", "chance to hit");
nu stat("mov", "movement", "distance travelable");

View File

@ -7,7 +7,7 @@ global.map = [
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(u, u, [c_lime], [new statmod(st.def, 5, add)]), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
@ -26,13 +26,8 @@ function c_informtiles() {
c_informtiles();
global.tilesize = new vec2(32, 32);
function tiledata(passable_=true, contents_=[], overlays_=[], statmods=[]) constructor {
passable = passable_;
contents = contents_;
overlays = overlays_;
modifiers = {};
var i;
for (i=0; i<array_length(statmods); i++) {
modifiers[$statmods[i].name] = statmods[i];
}
function tiledata(passable_=true) constructor {
passable = passable;
contents = [];
overlays = [];
}

View File

@ -29,7 +29,7 @@ function unit(personaldata_, classdata_, stats_) constructor {
global.unitdata[$name] = self;
}
nu unit(mydata, mydata, [st.hp.add(92), st.str.add(20), st.def.add(10), st.spd.add(5), st.mov.add(4), st.hit.add(0)]);
nu unit(mydata, mydata, [st.hp.add(92), st.str.add(20), st.def.add(20), st.spd.add(5)]);
mydata = {
name: "kris",
@ -39,7 +39,7 @@ mydata = {
up: s_guy2,
down: s_guy2,
}
nu unit(mydata, mydata, [st.hp.add(110), st.str.add(20), st.def.add(10), st.spd.add(5), st.mov.add(6), st.hit.add(0)]);
nu unit(mydata, mydata, [st.hp.add(92), st.str.add(20), st.def.add(20), st.spd.add(5)]);
function archetypedata() constructor {
//PERSONALDATA AND CLASSDATA ARE THE SAME THINGS

View File

@ -3,8 +3,8 @@ global.weapons = {};
function weapon(name_, description_, type_, statmods=[]) constructor {
name = name_;
description = description_;
type = WPTYPE.SWORD;
modifiers = {};
type = WPTYPE.SWORD;
var i;
for (i=0; i<array_length(statmods); i++) {
modifiers[$statmods[i].name] = statmods[i];
@ -36,8 +36,7 @@ function c_equipweapon(target, weapon_) {
log(target.data.str.val);
}
nu weapon("nothing", "it's literally nothing", WPTYPE.NULL);
nu weapon("knife", "bleed, bleed", WPTYPE.SWORD, [new statmod(st.str, 20, add), new statmod(st.hit, 100, add)]);
nu weapon("iron sword", "made of a cringe material", WPTYPE.SWORD, [new statmod(st.str, 6, add), new statmod(st.hit, 90, add)]);
nu weapon("knife", "bleed, bleed", WPTYPE.SWORD, [new statmod(st.str, 20, add)]);
function c_modifierreset(target) {
var dudes = variable_struct_get_names(target.data);