Adventure Squad Hut Area
This is actually just the hut area where the user will spend their time. This should be runnable without the hero bit.
by Sam Fereday
HTML
<button>
Recruit Hero
</button>
<button>
Train Heroes
</button>
<button>
Send On Adventure
</button>
JavaScript
/*
Ideas used from FFXIV initially. I really like their approach to making a squadron simulator of sorts.
Will require:
- Roster
- Training section
- Job assignment area
- Guild treasury
Get those in place first off. I'm also going to make use of some new sorts of inheritance in js. It'll likely stay as html this one.
Remember: Don't fall in to the Gorilla - Banana problem.
*/
/// Banana-gorilla (composition over inheritance)
let Getter = function(){};
let Setter = function(){};
/// Models (consider changing how these are declared, literals might be best)
let HeroModel = function() {
this.name = "";
this.job = "";
this.currentAction = "";
this.carries = [];
this.wallet = 0;
this.stats = {
level: 1,
fatique: 0,
hp: {
current: 122,
max: 122
}
}
}
let GuildModel = function() {
this.inventory = [];
this.bank = 0;
this.fame = 0;
this.paydayWage = 0;
}
let JobModel = function() {
this.name = "";
this.description = "";
this.difficulty = 10; // Uses level-based difficulty that'll sync with hero
this.rewards = {
exp: 200,
items: []
}
}
let TrainingModel = function() {
this.name = "";
this.description = "";
this.increases = {
health: 100
};
this.penalty = {
fatigue: 10
};
}
let RosterModel = function() {
this.heroes = [];
this.stats = {
groupStrength: 0,
groupHealth: 0,
groupFatigue: 0
}
}
/// Collections
class JobCollection extends
/// Managers (singleton)
// Responsible for training heroes over time
let trainingManager = {
update: function() {
// increases stats of each hero training but adds fatigue
},
train: function(heroes) {
}
}
// Responsible for mission (similar to training)
let missionManager = {
update: function() {
//
}
}
// Responsible for recruitment
let recruitmentManager = {
update: function() {
// gets a list of possible recruits for you to use
},
recruit: function(id) {
}
}
// UI /...