Author Topic: Danmakufu Q&A/Problem Thread  (Read 172190 times)

CK Crash

  • boozer
Re: Danmakufu Q&A/Problem Thread
« Reply #780 on: September 26, 2009, 02:42:51 PM »
Instead of using rand(0,360) for the bullet angle, set a variable to rand(0,360), and use that variable.

Example:
Code: [Select]
loop(10)
{
let angle = rand(0,360);
CreateShotA(0,GetX,GetY,10);
SetShotDataA(0,0,2,angle,0,0,0,RED01);
SetShotDataA(0,60,4,angle+180,0,0,0,BLUE01);
FireShot(0);
}

Nimono

  • wat
Re: Danmakufu Q&A/Problem Thread
« Reply #781 on: September 27, 2009, 12:33:52 AM »
Does anyone have any suggestions on how I could put an effect object above player bullets, but below ENEMY ones? If I put it on the Bullet layer, it ends up going above ALL bullets, not just player bullets... I basically just want to emulate the official Touhou fact that the player sprite goes above player bullets, but NOT enemy bullets. Sadly, this seems impossible right now. (Why did they make the player go below its own bullets? That's a terrible idea, IMO, because I can't make bullets spawn directly below the player without getting distracted BY those bullets going over the player graphics!)

Re: Danmakufu Q&A/Problem Thread
« Reply #782 on: September 27, 2009, 04:06:40 AM »
Does anyone have any suggestions on how I could put an effect object above player bullets, but below ENEMY ones?

ObjEffect_SetLayer(obj, 3);

Any object effect you set on any layer will be placed above everything on that current layer, but below everything on the next layer. So the player is layer 3 and the bullets are layer 4, so the effect is in between them. Does this not work? (Player bullets are layer four as well, aren't they...?)

Nimono

  • wat
Re: Danmakufu Q&A/Problem Thread
« Reply #783 on: September 27, 2009, 02:57:11 PM »
Yeah, Player Bullets are on the "Bullets" layer... Which is ABOVE the player layer. (If they were below it, then I wouldn't even be trying to use an effect object. XD) That's the problem. The only possible way to make them go below the player is to recode every single shot into an effect object. Oh gosh, how annoying it'd be to make it vanish when it hit the enemy, too.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread
« Reply #784 on: September 28, 2009, 12:08:16 AM »
I've been working on this for a while, and I just don't quite get it...

I'm trying to rewrite the one of the tutorial's patterns to load @Initialize to get a better understanding of Danmakufu. It's quite simple, but it keeps throwing me off when I try to simplify it. 
Code: [Select]
#TouhouDanmakufu
#Title[Waves]
#Text[Using INIT to spawn bullets in a circular pattern.]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{


   let imgExRumia="script\ExRumia\img\ExRumia.png";
   let frame = 0;
   let frame2 = 0;
   let angle = 0;
   let radius = 60;
   let angleAcc=0;
   
   
   @Initialize{
      SetLife(1500);
      SetTimer(60);
      SetInvincibility(30);
      LoadGraphic(imgExRumia);
      SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
      hitit;
   }
   
   @MainLoop{
   SetCollisionA(GetX, GetY, 32);
   SetCollisionB(GetX, GetY, 16);
 
   yield;

SetPlayerInvincibility(20000);
   
   }

   @DrawLoop{
     

      SetColor(255,255,255);
      SetRenderState(ALPHA);
      SetTexture(imgExRumia);
      SetGraphicRect(64,1,127,64);
      DrawGraphic(GetX,GetY);
   }
     
   @Finalize
   {
   DeleteGraphic(imgExRumia);
   }
   

   task hitit{


       loop(120){yield;}

      loop{
      loop(70){
      loop(5){
         CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, angle, BLUE12, 12);
                                             angle += 360/5;}
                       
            angle+=angleAcc;
            angleAcc+=0.05;

            radius++;
            yield;}
loop(4){
 loop(70){
      loop(5){
         CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, angle, BLUE12, 12);
                                             angle += 360/5;}
                       
            angle+=angleAcc;
            angleAcc+=0.05;
            radius--;
            yield;}
}
loop(3){
         loop(70){
      loop(5){
         CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, angle, BLUE12, 12);
                                             angle += 360/5;}
                       
            angle+=angleAcc;
            angleAcc+=0.05;
            radius++;
            yield;}                 

}
                     
}

           
 
}
}

Why can't I just
Code: [Select]
angle+=0.05; instead of
Code: [Select]
angle+=angleAcc;
angleAcc+=0.05;

The way I see it, I'm telling it to do the same thing both ways. But I get a different pattern when I simplify it.  Where did I go wrong?
« Last Edit: September 28, 2009, 12:13:26 AM by Fujiwara no Mokou »

Re: Danmakufu Q&A/Problem Thread
« Reply #785 on: September 28, 2009, 12:14:12 AM »
angle+=0.05; will increase the angle by 0.05 by every frame.

But
angle+=angleAcc;
angleAcc+=0.05
does NOT.
It will increase the angle first by 0.05, then 0.1, then 0.15 etc, hence why it's called angleAcc (For acceleration).

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread
« Reply #786 on: September 28, 2009, 12:30:01 AM »
angle+=0.05; will increase the angle by 0.05 by every frame.

But
angle+=angleAcc;
angleAcc+=0.05
does NOT.
It will increase the angle first by 0.05, then 0.1, then 0.15 etc, hence why it's called angleAcc (For acceleration).

But that just doesn't make sense.

If angle+=angleAcc
and angleAcc+=0.01

Then that means angle += (angle+0.01)

Danmakufu kinda crashes when I plug that in. Why?
And I don't have to use the variable "angleAcc" for it to work.  I could replace the that variable to anything else, as long as I replace it everywhere it's placed.

Re: Danmakufu Q&A/Problem Thread
« Reply #787 on: September 28, 2009, 12:38:00 AM »
Then that means angle += (angle+0.01)
Nope. You forget angleAcc is a variable too. Whenever angleAcc+= is called, it is increased, and then angle+=angleAcc; adds everything.

So for instance if you ran
angle+=angleAcc;
angleAcc+=0.05
it would go something like this assuming both variables are 0 (although this is arbitrary).

First run of the loop.
angle+=angleAcc;
Now it looks for variable angleAcc, which is 0, and adds it to itself, so angle is still 0.
angleAcc+=0.05
Now angleAcc is incremented by 0.05. Now we are left with angle still at 0 and angleAcc at 0.05.

Second loop.
angle+=angleAcc;
Now angle is 0.05.
angleAcc+=0.05
Now angleAcc is 0.10.

Third loop.
angle+=angleAcc;
The current value of angleAcc is 0.10, not 0.05, so now angle is 0.15, not 0.1, hence it accelerated.
angleAcc+=0.05
Now angleAcc is 0.15.

And so on

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread
« Reply #788 on: September 28, 2009, 01:22:23 AM »
But why does it crash when I put in
angle+=(angle+0.05);  ?
Initially, the angle is 0. (it's loaded @initialize and has error if deleted).

So first loop should be

It already has the angle loaded, which is 0, then angle is called at the bullet's fire, so it shouldn't run an error. Then near the end of the loop, it should run angle+=angle+(0.05);
in this case,    angle=0+(0.05) , the 0 got from @Initialize like used in the bullets.

So angle should be left 0.05.
And repeat the loop.

So at the beginning of the new loop, it should load
angle=0.05, which is used for the next arrange of bullets looped
and near the end of the loop, it should add 0.05 to itself (thus making angle=0.1) , so after the bullet is fired and reads
angle+=(angle+(0.05)), it should read  (angle=0.05+(0.05).   So after the statement, it should conclude angle=0.1

And likewise, third loop, it should use 0.1 as the angle for the bullets and all.

then near the end of the loop, it adds angle+=(angle+0.05). In this case, angle=(0.1+0.05)
and conclude angle=0.15

and repeat so on.

Why the crash?


Here's an example.
Code: [Select]
#TouhouDanmakufu
#Title[Waves]
#Text[Using INIT to spawn bullets in a circular pattern.]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{


   let imgExRumia="script\ExRumia\img\ExRumia.png";
   let frame = 0;
   let frame2 = 0;
   let angle=0;
   let radius = 60;
   let angleAcc=0;
   
   
   @Initialize{
      SetLife(1500);
      SetTimer(60);
      SetInvincibility(30);
      LoadGraphic(imgExRumia);
      SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
      hitit;
   }
   
   @MainLoop{
   SetCollisionA(GetX, GetY, 32);
   SetCollisionB(GetX, GetY, 16);
 
   yield;

SetPlayerInvincibility(20000);
   
   }

   @DrawLoop{
     

      SetColor(255,255,255);
      SetRenderState(ALPHA);
      SetTexture(imgExRumia);
      SetGraphicRect(64,1,127,64);
      DrawGraphic(GetX,GetY);
   }
     
   @Finalize
   {
   DeleteGraphic(imgExRumia);
   }
   

   task hitit{


       loop(120){yield;}


      loop(1){
      loop{
         CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, angle, BLUE12, 12);
                                 angle += (angle+5);  loop(3){yield;}         
                       


       
           
           

}


}
                     
}

           
 
}
}

It works for a little while, and will work longer when the yield is looped more.  But it will "crash", if you only loop yield once.  See for yourself.
« Last Edit: September 28, 2009, 01:40:20 AM by Fujiwara no Mokou »

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #789 on: September 28, 2009, 01:50:06 AM »
No...
angle+=angle+(0.05); is:
1. angle=0, angle+=0+(0.05); => angle+=0.05, angle=0+0.05; angle=0.05

2. angle=0.05, angle+=0.05+0.05 => angle+=0.1, angle=0.05+0.1=0.15;

So you are just using the angle+=0.05 and angle=angle+0.05, which has the same meaning after all, at the same time, of course it is wrong.

Quote
It already has the angle loaded, which is 0, then angle is called at the bullet's fire, so it shouldn't run an error. Then near the end of the loop, it should run angle+=angle+(0.05);
in this case,    angle=0+(0.05) , the 0 got from @Initialize like used in the bullets.

You see, += does not mean = (assignment).
« Last Edit: September 28, 2009, 01:51:39 AM by Henry »
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread
« Reply #790 on: September 28, 2009, 02:25:20 AM »

So you are just using the angle+=0.05 and angle=angle+0.05, which has the same meaning after all, at the same time, of course it is wrong.

I know that angle+=0.05 means that it adds 0.05 to the angle when the statement is read.  What I meant was what the angle was after that statement, the one used after the first loop.

Say, Initial angle is 0.

Code: [Select]
      loop(2){
         CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, angle, BLUE12, 12);
                      loop(20){yield;}        angle+=30;
             }

The first angle used, the one to fire the bullets, is 0.  Near the end of the loop, it adds 30 to itself.
So the angle at the end of the loop is 30.  Angle=30

So the next loop of bullets fired would be equivalent to
CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, 30, BLUE12, 12);





Now here's what bothers me.  Say initial angle is 0.05, and the code is

     
Code: [Select]
loop{
         CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, angle, BLUE12, 12);
                      loop(3){yield;}        angle+=angle;
             }


It should add angle to itself angle+=angle;   The statement read should be 0.05+=0.05   ,leaving angle=0.1 at the end.
So the angle used to fire the bullets at next loop should be 0.01

So 2nd loop of bullets should be equivalent to
CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, 0.01, BLUE12, 12);

then, it should read angle+=angle;    The statement read should be 0.1+=0.1       leaving angle=0.2 at the end
So the angle fired t the next loop should be 0.2

And with the same pattern, the third loop of fired bullets should read
CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, 0.2, BLUE12, 12);
and the loop after that
CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, 0.4, BLUE12, 12);



But it doesn't do that.  It crashes.
I don't know why.
Code: [Select]
#TouhouDanmakufu
#Title[Waves]
#Text[Using INIT to spawn bullets in a circular pattern.]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{


   let imgExRumia="script\ExRumia\img\ExRumia.png";
   let frame = 0;
   let frame2 = 0;
   let angle=0.05;
   let radius = 60;
   let angleAcc=0;
   
   
   @Initialize{
      SetLife(1500);
      SetTimer(60);
      SetInvincibility(30);
      LoadGraphic(imgExRumia);
      SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
      hitit;
   }
   
   @MainLoop{
   SetCollisionA(GetX, GetY, 32);
   SetCollisionB(GetX, GetY, 16);
 
   yield;

SetPlayerInvincibility(20000);
   
   }

   @DrawLoop{
     

      SetColor(255,255,255);
      SetRenderState(ALPHA);
      SetTexture(imgExRumia);
      SetGraphicRect(64,1,127,64);
      DrawGraphic(GetX,GetY);
   }
     
   @Finalize
   {
   DeleteGraphic(imgExRumia);
   }
   

   task hitit{


       loop(120){yield;}


      loop{
         CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 3, angle, BLUE12, 12);
                      loop(3){yield;}        angle+=angle;
             }
}


}
                     
}

           
 
}
}


Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #791 on: September 28, 2009, 02:39:36 AM »
hey, you didn't declare angle!  :o

On the other hand, why do you set the player to be invincible? :P
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread
« Reply #792 on: September 28, 2009, 02:53:34 AM »
hey, you didn't declare angle!  :o


It's @initialize

On the other hand, why do you set the player to be invincible? :P


Because I took the original and converted it so everything was loaded @initialize.
I had it arranged so I had to have one yield in there for it to work so I can see exactly where the bullets were spawn, and didn't want to go through the whole trouble of rewriting the script so it spawned where it supposed to, then yielded, instead of making it skip a few angles due to the yield and then spawn

Anyway, I got down to that simple script there, and forgot about invincibility. Oops :V


I think I found my problem.  Once it got to angle+=angle  and angle got to a high number like 100, I'd get crazy results.  200 next frame, then 400, then 800.  I could see why it would crash after about 90 frames.  Spinning the angle 20,000+degrees would probably take more than 1/60th of a second.


Anyway, thanks for your help.

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #793 on: September 28, 2009, 05:10:56 AM »
Oh no... I didn't see your angle... sorry for that.

and, in my opinion, if uses of tasks are ont necessary, I don't use it. It is because this surely lowers the readability of the segments.

on the other hand, your variable angle, can be expressed in 0.5*2^(times of operation-1), you can simply use it.

And to prevent the value from going too large, use % (taking remainder) like:

angle+=angle;
angle%=360;
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Thaws

  • _m廿廿m_
Re: Danmakufu Q&A/Problem Thread
« Reply #794 on: September 28, 2009, 08:41:45 AM »
Spinning the angle 20,000+degrees would probably take more than 1/60th of a second.

I know you have no problem with the script now, but I just feel like pointing this out:
Spinning the angle 20 000+ degrees is extremely easy for the computer, it goes something like Current angle = 100500 --> Current Angle + 20000 = 120500 --> Update graphic so it faces angle 120500, the program does not attemp to spin the angle 1 degree by 1 degree for 20000 times or something that makes changing the angle by 20000 degrees more difficult than by 10.

I guess that the problem here is that your number exceeded the number of bits an integer variable can store. If you angle started off as 2, then 1 second later, it'll be 2^60 already, so you can imagine why the script died.
« Last Edit: September 28, 2009, 02:21:21 PM by Thaws »

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #795 on: September 28, 2009, 01:46:52 PM »
So using angle%=360; is efficient and simple to solve the problem :)
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread
« Reply #796 on: September 28, 2009, 08:06:58 PM »
Another question.

I'm curious, is there a way to reduce or add ADDframe by frame?

Code: [Select]
SetAlpha(255); is the minimum opacity, so can I make it completely transparent if the value was set at 0.
I know there's a way to change the opacity depending on the frames.  If you have this set up @initialize

Code: [Select]
@initialize{
let variable = 0;
}


and this in @drawloop

Code: [Select]
SetAlpha(variable);
variable+=10;
if(variable==200){variable=0;}

You'll have a "pulsing" effect when the stuff is drawn.
What I want, is that same "pulsing" effect set with ADD rendering.


Any ideas?

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #797 on: September 29, 2009, 12:22:30 AM »
This is simple if the bullet itself is in ADD rendering...
else you may use
SetRenderState(ADD) (I doubt whether it works, some computer at school cannot open danmakufu)
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

CK Crash

  • boozer
Re: Danmakufu Q&A/Problem Thread
« Reply #798 on: September 29, 2009, 12:44:11 AM »
Quick question, what exactly does GetPlayerScriptName return? I can't seem to get it to recognize my player script in an if statement...

Re: Danmakufu Q&A/Problem Thread
« Reply #799 on: September 29, 2009, 01:20:11 AM »
The name you declared for replays, if I remember correctly (string).

Re: Danmakufu Q&A/Problem Thread
« Reply #800 on: September 29, 2009, 02:24:48 AM »
Im having a problem trying to start this game...

I try to install Applocale and I get the error,

"There is a problem with this Windows Installer package. A program required to complete could not be run."

Yes I have Vista, I have no idea what to do. Please someone help! :-[

Jana

  • mrgrgr
  • *
Re: Danmakufu Q&A/Problem Thread
« Reply #801 on: September 29, 2009, 02:26:49 AM »
Applocale just plain doesn't work with Vista. It's XP only.

Quick Edit: Changing your system locale to Japanese will let you execute Danmakufu, if you don't mind that.

Re: Danmakufu Q&A/Problem Thread
« Reply #802 on: September 29, 2009, 02:31:19 AM »
Ahh, thanks! Let me try that... Lets see if it works..

Zengar Zombolt

  • Space-Time Tuning Circle - Wd/Fr
  • Green-Red Divine Clock
Re: Danmakufu Q&A/Problem Thread
« Reply #803 on: September 29, 2009, 02:35:57 AM »
Actually you can force Applocale to install in Vista.
Just do it through the command console or Task Manager (I'm not sure which one) and be sure of applying Admin Rights.

Re: Danmakufu Q&A/Problem Thread
« Reply #804 on: September 29, 2009, 02:42:21 AM »
BAHHH!!!

I used the Japanese Locale, changed my location to japan, and installed all japanese language fonts and it still dosent work! :-[

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread
« Reply #805 on: September 29, 2009, 05:14:39 AM »
This is simple if the bullet itself is in ADD rendering...
else you may use
SetRenderState(ADD) (I doubt whether it works, some computer at school cannot open danmakufu)

Well, yeah, I know that.  But what I'm looking for is some kind of ADD value the same way I get an Alpha value.


Kinda like SetAlpha(255);

Except for ADDITIVE blending.   SetADD(255);
or any other value I want.  I'd like to get that "pulsing" effect I said earlier. It'll make some pretty cool effects.

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread
« Reply #806 on: September 29, 2009, 08:22:31 AM »
You want SetColor. The brightness of ADD type blending isn't determined by transparency, it's determined by how bright the colors of the image are. Therefore, by dimming the image with SetColor (by reducing the R,G,B values equally) you make it more transparent.

As a side note, boy howdy are you obsessed with recreating that phoenix background. To get ahead of what will probably be a question in the future, use SetGraphicScale to make the size of the ADD phoenix pulse along with its brightness.

Infy♫

  • Demonic★Moe
  • *
Re: Danmakufu Q&A/Problem Thread
« Reply #807 on: September 29, 2009, 02:42:02 PM »
FOG
GOD DAMN FOG
ARRRRRRRGH I HATE IT
IT PRODUCES THE SAME UGLY ERRORS EVERY TIME
THE FOG COMES WITH THE BACKGROUNDS AS THEY GET CLOSER TO THE PLAYER CHARACTER >.>
wtf is this. and dont give stupid answers without actually testing it please. seriously.

i also got more problems with it. the alpha value does not let you see the underlying things.

this is my test script for today:
http://www.mediafire.com/?sharekey=f105d62fce2408b20dec85adfe0a530ae04e75f6e8ebb871

Re: Danmakufu Q&A/Problem Thread
« Reply #808 on: September 29, 2009, 09:19:28 PM »
Applocale just plain doesn't work with Vista. It's XP only.

Or not. I've used applocale on two different systems running Vista, and it's worked perfectly for months now. I don't know how people are fucking this up, it's pretty straight forward (read: exactly the same) as XP, despite it saying otherwise. Do people not run things as administratior (or are not the default admin of their computer)? This is the only problem I can see. You can also run things under XP settings using Vista, so there is no excuse. Maybe torrenting Vista is a bad idea guys.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread
« Reply #809 on: September 29, 2009, 09:51:24 PM »
You want SetColor. The brightness of ADD type blending isn't determined by transparency, it's determined by how bright the colors of the image are. Therefore, by dimming the image with SetColor (by reducing the R,G,B values equally) you make it more transparent.

As a side note, boy howdy are you obsessed with recreating that phoenix background. To get ahead of what will probably be a question in the future, use SetGraphicScale to make the size of the ADD phoenix pulse along with its brightness.

haha thanks.  And yeah... I'm kinda recreating the IN extra stage. ;D  I already had the GraphicScale part down perfectly, all I needed was what you said, so thanks.

So far, I got the things I finished were Keine's spellcards, 3 of Mokou's spellcards, the Phoenix effect(as soon as I'm done), and Mokou's BG.

The toughest part will probably be the whole blowing up/resurrection thing.  Looping yield doesn't work @finalize, so I'm going to have to find another way to delay the frames when the boss blows up.

By the looks of it, I may have to set the effects @initialize of the next spell, cause I don't know any function that I can use if(boss's life is 0){stuff happens;} in the current spellcard.  Oh well.