Skip to content

Commit

Permalink
Initial commit of this repository. This will be a significant underta…
Browse files Browse the repository at this point in the history
…king.
  • Loading branch information
Zach Babb authored and Zach Babb committed Jun 4, 2013
0 parents commit 0e47540
Show file tree
Hide file tree
Showing 1,925 changed files with 114,197 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
35 changes: 35 additions & 0 deletions AbstractBattleAnimalEntity.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// AbstractBattleAnimalEntity.h
// TEORBattleTest
//
// Created by Zach Babb on 5/29/11.
// Copyright 2011 InstantLazer. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AbstractBattleEntity.h"

@class AbstractBattleEntity;

@interface AbstractBattleAnimalEntity : AbstractBattleEntity {

AbstractBattleEntity *target;
BOOL allEnemies;
BOOL allCharacters;
float attackPower;
float helpPower;
}

@property (nonatomic, retain) AbstractBattleEntity *target;
@property (nonatomic, assign) BOOL allEnemies;
@property (nonatomic, assign) BOOL allCharacters;

- (void)timerFired;

- (void)beSummoned;

- (void)depart;

- (void)joinBattle;

@end
62 changes: 62 additions & 0 deletions AbstractBattleAnimalEntity.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
//
// AbstractBattleAnimalEntity.m
// TEORBattleTest
//
// Created by Zach Babb on 5/29/11.
// Copyright 2011 InstantLazer. All rights reserved.
//

#import "AbstractBattleAnimalEntity.h"
#import "AbstractBattleEntity.h"


@implementation AbstractBattleAnimalEntity

@synthesize target;
@synthesize allEnemies;
@synthesize allCharacters;

- (id)init {

self = [super init];
if (self) {

allEnemies = NO;
allCharacters = NO;
battleTimer = 0;
attackPower = 1;
helpPower = 1;
}
return self;
}

- (void)updateWithDelta:(float)aDelta {

[super updateWithDelta:aDelta];
battleTimer += aDelta;
if (battleTimer > 8.0) {
[self timerFired];
battleTimer = 0 + (RANDOM_0_TO_1() * 2);
}
}

- (void)setTarget:(AbstractBattleEntity *)aEntity {

target = aEntity;
allEnemies = NO;
allCharacters = NO;
}

- (void)timerFired {}

- (void)beSummoned {}

- (void)depart {}

- (void)joinBattle {
target = nil;
allEnemies = NO;
allCharacters = NO;
}

@end
48 changes: 48 additions & 0 deletions AbstractBattleAnimation.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// AbstractBattleAnimation.h
// TEORBattleTest
//
// Created by Zach Babb on 5/22/11.
// Copyright 2011 InstantLazer. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AbstractGameObject.h"

@class BitmapFont;
@class GameController;
@class AbstractBattleEntity;
@class AbstractBattleEnemy;
@class AbstractBattleCharacter;

@interface AbstractBattleAnimation : AbstractGameObject {

GameController *sharedGameController;

AbstractBattleEntity *originator;
AbstractBattleEntity *target1;
AbstractBattleEntity *target2;
AbstractBattleEntity *target3;
AbstractBattleEntity *target4;

}

- (id)initToEnemy:(AbstractBattleEnemy *)aEnemy;

- (id)initEnemyArea;

- (id)initToCharacter:(AbstractBattleCharacter *)aCharacter;

- (id)initToCharacterArea;

- (void)updateWithDelta:(float)aDelta;

- (void)render;

- (int)calculateDamageFrom:(int)aDealer to:(int)aReceiver;

- (void)calculateEffectFrom:(AbstractBattleEntity *)aOriginator to:(AbstractBattleEntity *)aTarget;

- (void)resetAnimation;

@end
65 changes: 65 additions & 0 deletions AbstractBattleAnimation.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
//
// AbstractBattleAnimation.m
// TEORBattleTest
//
// Created by Zach Babb on 5/22/11.
// Copyright 2011 InstantLazer. All rights reserved.
//

#import "AbstractBattleAnimation.h"
#import "Global.h"
#import "SoundManager.h"
#import "GameController.h"
#import "BitmapFont.h"
#import "AbstractScene.h"


@implementation AbstractBattleAnimation


- (void)dealloc {

[super dealloc];
}

- (id)init {

if (self = [super init]) {
sharedGameController = [GameController sharedGameController];
// battleFont = sharedGameController.currentScene.battleFont;

}

return self;
}

- (id)initToEnemy:(AbstractBattleEnemy *)aEnemy {
return [self init];
}

- (id)initEnemyArea {
return [self init];
}

- (id)initToCharacter:(AbstractBattleCharacter *)aCharacter {
return [self init];
}

- (id)initToCharacterArea {
return [self init];
}

- (void)updateWithDelta:(float)aDelta {}

- (void)render {}

- (int)calculateDamageFrom:(int)aDealer to:(int)aReceiver {
return 30;
}

- (void)calculateEffectFrom:(AbstractBattleEntity *)aOriginator to:(AbstractBattleEntity *)aTarget {
}

- (void)resetAnimation {}

@end
77 changes: 77 additions & 0 deletions AbstractBattleCharacter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
//
// AbstractBattleCharacter.h
// TEORBattleTest
//
// Created by Zach Babb on 5/25/11.
// Copyright 2011 InstantLazer. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AbstractBattleEntity.h"

@class Animation;
@class Image;
@class RuneObject;
@class AbstractBattleEnemy;

@interface AbstractBattleCharacter : AbstractBattleEntity {

int battleLocation;
Animation *currentAnimation;
NSMutableDictionary *knownRunes;
RuneObject *queuedRune;
int queuedRuneNumber;
BOOL currentTurn;
float currentTurnFlashTimer;
NSMutableArray *weaponRuneStones;
NSMutableArray *armorRuneStones;
Image *currentTurnImage;
Image *enduranceMeterImage;
Image *essenceMeterImage;
Image *hpMeterImage;
Image *essenceMeter;
Image *enduranceMeter;
Image *hpMeter;
}

@property (nonatomic, retain) NSMutableDictionary *knownRunes;
@property (nonatomic, assign) BOOL currentTurn;
@property (nonatomic, assign) int queuedRuneNumber;

- (id)initWithBattleLocation:(int)aLocation;

- (void)initBattleAttributes;

- (void)endBattleWithExperience:(int)aExperience;

- (void)battleLocationIs:(int)aLocation;

- (void)relinquishPriority;

- (void)gainPriority;

- (void)updateRuneLocationTo:(CGPoint)aLocation;

- (void)queueRune:(int)aRune;

- (void)youAttackedEnemy:(AbstractBattleEnemy *)aEnemy;

- (void)runeWasPlacedOnEnemy:(AbstractBattleEnemy *)aEnemy;

- (void)runeWasPlacedOnCharacter:(AbstractBattleCharacter *)aCharacter;

- (void)runeAffectedAllCharacters;

- (void)runeAffectedAllEnemies;

- (void)youReceivedWeaponElement:(int)aElement;

- (void)youReceivedShield:(int)aElement;

- (int)calculateAttackDamageTo:(AbstractBattleEnemy *)aEnemy;

- (void)youHaveBeenRevived;

- (void)gainDoubleAttack:(int)aNumber;

@end
Loading

0 comments on commit 0e47540

Please sign in to comment.