home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ring.yamanashi.ac.jp/pub/pc/freem/action/
/
action.zip
/
TQAP.zip
/
Usr
/
Sungeki.tonyu
< prev
next >
Wrap
Text File
|
2007-06-09
|
5KB
|
282 lines
extends SpriteChar;
$screenWidth =32*15;
$screenHeight=32*12;
$map.setbgcolor(color(0,0,0));
$map.scrollTo(32,32);
type=p;
p=-1;
$Location.sungeki=1;
for (e in $chars){
if (e is Effect ) e.die();
if (e is Enemy ) e.die();
if (e is Key ) e.die();
if (e is Door ) e.die();
if (e is Mychar ) e.die();
if (e is Opening) e.die();
if (e is Magic ) e.die();
}
//âXâeü[âW1
if (type==1){
sungeki_init("sungeki_001");
Mychar=appear(new Puppet(100,200));
key_input();
updateEx(20);
key_input();
updateEx(20);
key_input();
Mychar_right(500);
updateEx(150);
key_input();
updateEx(50);
clear_all();
file=new FileReader($Location.stagefile);
while(1){
blockline=file.readLn();
if (blockline=="*init") break;
}
$Location.stage =valueOf(file.readLn().substring(8));
$Location.set_x =valueOf(file.readLn().substring(8));
$Location.set_y =valueOf(file.readLn().substring(8));
$Location.nokori=valueOf(file.readLn().substring(8));
file.close();
appear(new load());
$Location.sungeki=0;
die();
}
//âQü[âÇé╠Éαû╛
if (type==0){
sungeki_init("sungeki_howtoplay");
Mychar=appear(new Puppet(100,200));
key_input();
updateEx(10);
key_input();
updateEx(10);
key_input();
Mychar_right(50);
updateEx(100);
Mychar_left(20);
updateEx(100);
key_input();
Mychar_up(30);
updateEx(50);
Mychar_down(20);
updateEx(50);
Mychar_up(50);
Mychar_right(1);
updateEx(100);
key_input();
Mychar_right(20);
updateEx(20);
Mychar_jump();
updateEx(50);
key_input();
Mychar_magic();
updateEx(250);
key_input();
Mychar_magic();
updateEx(10);
Mychar_jump();
Mychar_right(5);
updateEx(200);
key_input();
Mychar_right(100);
Mychar_magic();
updateEx(200);
key_input();
Mychar_right(150);
updateEx(10);
Mychar_magic();
updateEx(100);
key_input();
Mychar_right(50);
Mychar_jump();
updateEx(100);
key_input();
Mychar_right(45);
updateEx(50);
Mychar_jump();
updateEx(100);
key_input();
Mychar_left(50);
updateEx(50);
Mychar_magic();
updateEx(100);
Mychar_left(30);
updateEx(50);
Mychar_magic();
updateEx(100);
key_input();
Mychar_left(100);
updateEx(100);
Mychar_right(1);
key_input();
updateEx(10);
key_input();
updateEx(10);
key_input();
clear_all();
$projectManager.loadPage($page_index);
}
//âGâôâfâBâôâO
if (type==99){
sungeki_init("sungeki_ending");
Mychar=appear(new Puppet(100,200));
key_input();
Mychar_right(70);
updateEx(100);
Mychar_jump();
updateEx(30);
key_input();
Mychar_right(110);
updateEx(120);
Mychar_left(1);
updateEx(100);
key_input();
updateEx(100);
key_input();
key_input();
clear_all();
$projectManager.loadPage($page_index);
}
//æÇéΦÉlî`ê┌ô«--------------------------------------------------
function Mychar_right(_time){
move=appear(new Effect(0,0,"puppet_move_right",_time));
move.puppet=Mychar;
}
function Mychar_left(_time){
move=appear(new Effect(100,100,"puppet_move_left",_time));
move.puppet=Mychar;
}
function Mychar_up(_time){
move=appear(new Effect(100,100,"puppet_move_up",_time));
move.puppet=Mychar;
}
function Mychar_down(_time){
move=appear(new Effect(100,100,"puppet_move_down",_time));
move.puppet=Mychar;
}
function Mychar_magic(){
move=appear(new Effect(100,100,"puppet_magic"));
move.puppet=Mychar;
}
function Mychar_jump(){
move=appear(new Effect(100,100,"puppet_move_jump"));
move.puppet=Mychar;
}
function wait_puppet(_page){
while(1){
if (narration.page==_page) break;
update();
}
}
function key_input(){
narration.okuri=1;
while(narration.okuri==1){
update();
}
}
//Åëè·Åêù¥üiâ}âbâvô╟é▌ì₧é▌üAâüâbâZü[âWèiö[é╚é╟üj------------------
function sungeki_init(filename){
file=new FileReader(filename+".txt");
blockzero=$pat_block+0;
for (_y=1;_y<25;_y++){
blockline=file.readLn();
for (_x=1;_x<31;_x++){
block=blockzero+valueOf(blockline.substring((_x-1)*2,_x*2));
$map.set(_x,_y,block);
}
}
message="";
read="";
file.readLn();
while(1){
read=file.readLn();
message=message+read+"#";
if(read==null) break;
}
file.close();
appear(new Effect(x,y,"sungeki_black"));
narration=appear(new Effect(0,0,"narration",message));
wait(1);
}
function clear_all(){
for (e in $chars){
if (e is Effect) e.die();
if (e is Puppet) e.die();
}
for (_y=1;_y<25;_y++){
for (_x=1;_x<31;_x++){
$map.set(_x,_y,$pat_block+0);
}
}
}