SHOW:
|
|
- or go back to the newest paste.
| 1 | #TouhouDanmakufu | |
| 2 | #Title["Trial by the Ten Kings"] | |
| 3 | #BGM[.\Touhou Judgement in the Sixtieth Year ~ Fate of Sixty Years] | |
| 4 | #Player[FREE] | |
| 5 | #ScriptVersion[2] | |
| 6 | ||
| 7 | script_enemy_main{
| |
| 8 | ||
| 9 | #include_function ".\function_cutin.txt"; | |
| 10 | ||
| 11 | let CSD = GetCurrentScriptDirectory; | |
| 12 | ||
| 13 | let imgboss = CSD ~ "system\imgboss.png"; | |
| 14 | let cut = CSD ~ "system\cut.png"; | |
| 15 | let bg = CSD ~ "system\bgstill.png"; | |
| 16 | let lay = CSD ~ "system\bgscroll.png"; | |
| 17 | ||
| 18 | let f = 0; | |
| 19 | let f2 = 0; | |
| 20 | let slide = 0; | |
| 21 | ||
| 22 | let charge0 = CSD ~ "sfx\se_ch00.wav"; | |
| 23 | ||
| 24 | @Initialize{
| |
| 25 | SetLife(3000); | |
| 26 | SetTimer(180); | |
| 27 | SetMovePosition01(GetCenterX,GetCenterY-130,3); | |
| 28 | SetScore(1500000); | |
| 29 | cutin("NAZRIN",""\""Trial by the Ten Kings"\",cut,10,10,256,256);
| |
| 30 | MagicCircle(false); | |
| 31 | SetInvincibility(300); | |
| 32 | SetDamageRate(20,0); | |
| 33 | ||
| 34 | LoadGraphic(cut); | |
| 35 | LoadGraphic(bg); | |
| 36 | LoadGraphic(lay); | |
| 37 | LoadGraphic(imgboss); | |
| 38 | ||
| 39 | LoadSE(charge0); | |
| 40 | ||
| 41 | LoadUserShotData(CSD ~ "supershot.txt"); | |
| 42 | ||
| 43 | mainTask; | |
| 44 | } | |
| 45 | ||
| 46 | @MainLoop{
| |
| 47 | SetCollisionA(GetEnemyX,GetEnemyY,32); | |
| 48 | SetCollisionB(GetEnemyX,GetEnemyY,16); | |
| 49 | ||
| 50 | yield; | |
| 51 | } | |
| 52 | ||
| 53 | @DrawLoop{
| |
| 54 | SetTexture(imgboss); | |
| 55 | SetRenderState(ALPHA); | |
| 56 | SetAlpha(255); | |
| 57 | SetGraphicRect(0,0,64,86); | |
| 58 | SetGraphicScale(0.7,0.7); | |
| 59 | SetGraphicAngle(0,0,0); | |
| 60 | ||
| 61 | //no movement | |
| 62 | if(int(GetSpeedX())==0){
| |
| 63 | if(f<10){SetGraphicRect(0,0,64,86);}
| |
| 64 | if(f>=10 && f<20){SetGraphicRect(64,0,128,86);}
| |
| 65 | if(f>=20 && f<30){SetGraphicRect(128,0,192,86);}
| |
| 66 | if(f>=30){SetGraphicRect(192,0,256,86);}
| |
| 67 | f2 = 0; | |
| 68 | } | |
| 69 | ||
| 70 | //to the right | |
| 71 | if(GetSpeedX()>0){
| |
| 72 | if(f2<5){SetGraphicRect(0,86,64,172);}
| |
| 73 | if(f2>=5 && f2<10){SetGraphicRect(64,86,128,172);}
| |
| 74 | if(f2>=10 && f2<15){SetGraphicRect(128,86,192,172);}
| |
| 75 | if(f2>=15){SetGraphicRect(192,86,256,172);}
| |
| 76 | f2++; | |
| 77 | } | |
| 78 | ||
| 79 | //to the left | |
| 80 | if(GetSpeedX()<0){
| |
| 81 | SetGraphicAngle(180,0,0); | |
| 82 | if(f2<5){SetGraphicRect(0,86,64,172);}
| |
| 83 | if(f2>=5 && f2<10){SetGraphicRect(64,86,128,172);}
| |
| 84 | if(f2>=10 && f2<15){SetGraphicRect(128,86,192,172);}
| |
| 85 | if(f2>=15){SetGraphicRect(192,86,256,172);}
| |
| 86 | f2++; | |
| 87 | } | |
| 88 | ||
| 89 | DrawGraphic(GetX,GetY); | |
| 90 | f++; | |
| 91 | if(f==40){f=0;}
| |
| 92 | } | |
| 93 | ||
| 94 | @BackGround{
| |
| 95 | SetTexture(bg); | |
| 96 | SetRenderState(ALPHA); | |
| 97 | SetAlpha(255); | |
| 98 | SetGraphicRect(0,0,256,256); | |
| 99 | SetGraphicScale(2,2); | |
| 100 | SetGraphicAngle(0,0,0); | |
| 101 | DrawGraphic(GetCenterX,GetCenterY); | |
| 102 | ||
| 103 | SetTexture(lay); | |
| 104 | SetRenderState(ALPHA); | |
| 105 | SetAlpha(255); | |
| 106 | SetGraphicRect(0,0,256,8000); | |
| 107 | SetGraphicScale(1.5,1.5); | |
| 108 | SetGraphicAngle(0,0,0); | |
| 109 | DrawGraphic(GetCenterX,GetCenterY+slide); | |
| 110 | slide-=2; | |
| 111 | if(slide==-384){ slide = 0;}
| |
| 112 | } | |
| 113 | ||
| 114 | @Finalize{
| |
| 115 | DeleteGraphic(bg); | |
| 116 | DeleteGraphic(lay); | |
| 117 | DeleteGraphic(cut); | |
| 118 | DeleteGraphic(imgboss); | |
| 119 | ||
| 120 | DeleteSE(charge0); | |
| 121 | } | |
| 122 | ||
| 123 | task mainTask{
| |
| 124 | yield; | |
| 125 | Concentration01(120); | |
| 126 | PlaySE(charge0); | |
| 127 | wait(120); | |
| 128 | SetMovePosition03(GetCenterX,GetCenterY-170,10,60); | |
| 129 | spawn; | |
| 130 | } | |
| 131 | ||
| 132 | //creates familiars | |
| 133 | sub spawn{
| |
| 134 | CreateEnemyFromFile(CSD ~ "SC 5 F1.txt",GetCenterX,GetClipMinY-60,0,0,1200); | |
| 135 | CreateEnemyFromFile(CSD ~ "SC 5 F2.txt",GetCenterX,GetClipMinY-60,0,0,1200); | |
| 136 | CreateEnemyFromFile(CSD ~ "SC 5 F3.txt",GetCenterX,GetClipMinY-60,0,0,2400); | |
| 137 | CreateEnemyFromFile(CSD ~ "SC 5 F4.txt",GetCenterX,GetClipMinY-60,0,0,2400); | |
| 138 | CreateEnemyFromFile(CSD ~ "SC 5 F5.txt",GetCenterX,GetClipMinY-60,0,0,1800); | |
| 139 | CreateEnemyFromFile(CSD ~ "SC 5 F6.txt",GetCenterX,GetClipMinY-60,0,0,1800); | |
| 140 | CreateEnemyFromFile(CSD ~ "SC 5 F7.txt",GetCenterX,GetClipMinY-60,0,0,2400); | |
| 141 | CreateEnemyFromFile(CSD ~ "SC 5 F8.txt",GetCenterX,GetClipMinY-60,0,0,2400); | |
| 142 | CreateEnemyFromFile(CSD ~ "SC 5 F9.txt",GetCenterX,GetClipMinY-60,0,0,1800); | |
| 143 | } | |
| 144 | ||
| 145 | function wait(w){ loop(w){ yield;}}
| |
| 146 | ||
| 147 | } |