/* schemer.m,
 *
 * Stronger versions of Deceivers that also fire.
 * Zelda: "I have scheme!"
 * Helda: "I want scheme!"
 */

#include <allegro.h>
#include "common.h"
#include "projectiles/plasma.h"
#include "seborrhea/seborrhea.h"
#include "units/schemer.h"


static SebFile *schemer_sebum;


@implementation Schemer
+ (BOOL) loadPrerequisites { return LOAD_PROJECTILE_DATA_FOR(Plasma); }
+ derive_loadData(schemer_sebum, "data/schemer");
+ derive_shutdown(schemer_sebum);

- init
{
    [super init];

    health = 5;
    speed = 2.3;
    angle = 0.0;

    sprite = [schemer_sebum getSebumByName:"schemer"];
    shadow = [schemer_sebum getSebumByName:"shadow"];
    w = [sprite width];
    h = [sprite height];
    
    gun = [[[Weapon new]
	       setProjectile:[Plasma class]]
	      setShotDelay:80];

    activate_y = -200;
    return self;
}

- (void) fireProjectiles { [gun fireFromX:x Y:y angle:angle]; }
@end
