🍏 OBJ-C RUNES DIFFICULTY: Adept Behavioral

The Memento

Capturing and restoring the ethereal state of an entity.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Memento
ARCANUM SCHOOL: Chronomancy // Subschool: Preservation
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// OBJC PATTERN //
@interface TKSoulShard : NSObject
@property (nonatomic, strong, readonly) NSString *state;
- (instancetype)initWithState:(NSString *)state;
@end
@implementation TKSoulShard
- (instancetype)initWithState:(NSString *)state {
    if (self = [super init]) { _state = state; }
    return self;
}
@end

@interface TKMage : NSObject
@property (nonatomic, strong) NSString *healthState;
- (TKSoulShard *)saveState;
- (void)restoreState:(TKSoulShard *)shard;
@end
@implementation TKMage
- (TKSoulShard *)saveState { return [[TKSoulShard alloc] initWithState:self.healthState]; }
- (void)restoreState:(TKSoulShard *)shard { self.healthState = shard.state; }
@end

Memento bottles a mage’s essence in a soul shard. If corrupted, they can reverse time and restore their state from this encapsulated crystal.

Runic Tags: #objc #memento #behavioral