JSDSH/assets/adv01/adv01.js
2014-10-18 15:59:11 +02:00

48 lines
2.2 KiB
JavaScript

{
// Setup play area
start_init(400,387);
Crafty.background("url('/assets/adv01/adv01_bg.jpg') 100% 0");
// Ojects get saved within an array primary for easier debugging
var wall = [];
wall.push(Crafty.e("Wall").wall(0,0,150,37));
wall.push(Crafty.e("Wall").wall(242, 0, 160,39));
wall.push(Crafty.e("Wall").wall(130, 0, 115,11));
wall.push(Crafty.e("Wall").wall(0, 0, 54, 188));
wall.push(Crafty.e("Wall").wall(0, 274, 53, 113));
wall.push(Crafty.e("Wall").wall(40, 377, 360,10));
wall.push(Crafty.e("Wall").wall(390,0,10,387));
var cur_sel; // "Pointer" to current selected creature
var meters=50; // px/m, should be set such that the size of a player is ~ 0.4m x 0.4m
var player={};
/* initialize Players ("Player") and creatures ("Beast") */
player["Gesina"]=new Player({"pname":"Gesina", "cname":"Aknya", "class":"Zauberin", "level":0,
"experience":0, "race":"Mensch", "size":2},
{"body":6, "agility":6, "spirit":8},
{"strength":0,"hardness":2,"movement":0,"skill":3,"mind":3,"aura":3},
{"x":15,"y":200,"w":20,"h":20,"col":"rgb(120,0,255"});
player["Oliver"]=new Player({"pname":"Oliver", "cname":"Drag", "class":"Krieger", "level":0,
"experience":0, "race":"Mensch", "size":2},
{"body":8, "agility":6, "spirit":6},
{"strength":5,"hardness":5,"movement":0,"skill":0,"mind":0,"aura":0},
{"x":25,"y":230,"w":20,"h":20,"col":"rgb(0,0,255)"});
player["Gob1"]=new Beast({"pname":"Gob1", "experience":71, "race":"Goblin", "size":2},
{"body":11, "agility":6, "spirit":3},
{"strength":2,"hardness":3,"movement":0,"skill":3,"mind":2,"aura":0},
{"x":355,"y":65,"w":20,"h":20,"col":"red"},
{"life": 8, "defense": 7, "ini":9, "walk":4.5, "melee":7, "shoot":0, "chant":0,
"shoot_chant":0});
player["Gob2"]=new Beast({"pname":"Gob2", "experience":71, "race":"Goblin", "size":2},
{"body":11, "agility":6, "spirit":3},
{"strength":2,"hardness":3,"movement":0,"skill":3,"mind":2,"aura":0},
{"x":200,"y":80,"w":20,"h":20,"col":"red"},
{"life": 8, "defense": 7, "ini":9, "walk":4.5, "melee":7, "shoot":0, "chant":0,
"shoot_chant":0});
end_init();
}