Commit 9da792f0 authored by Romain DELEAU's avatar Romain DELEAU

add rewards, role-occurrence + update tasks / mission-context / role / scenario

parent 51b1f479
...@@ -2,6 +2,7 @@ export class MissionContext { ...@@ -2,6 +2,7 @@ export class MissionContext {
duration: string = ''; duration: string = '';
intrigue: string = ''; intrigue: string = '';
other: string = ''; communication = '';
various: string = '';
comments: Comment[] = []; comments: Comment[] = [];
} }
import { CharacterReward } from './character-reward';
describe('CharacterReward', () => {
it('should create an instance', () => {
expect(new CharacterReward()).toBeTruthy();
});
});
import { Character } from "../../character/character";
import { Reward } from "../reward";
export class CharacterReward implements Reward {
character!: Character;
}
import { ObjectiveReward } from './objective-reward';
describe('ObjectiveReward', () => {
it('should create an instance', () => {
expect(new ObjectiveReward()).toBeTruthy();
});
});
import { Reward } from "../reward";
export class ObjectiveReward implements Reward {
name: string = '';
}
import { ObjectsReward } from './objects-reward';
describe('ObjectsReward', () => {
it('should create an instance', () => {
expect(new ObjectsReward()).toBeTruthy();
});
});
import { Ressource } from "../../ressource/ressource";
import { Reward } from "../reward";
export class ObjectsReward implements Reward{
objects: Ressource[] = [new Ressource()];
}
import { QuestReward } from './quest-reward';
describe('QuestReward', () => {
it('should create an instance', () => {
expect(new QuestReward()).toBeTruthy();
});
});
import { Role } from "../../role/role";
import { Reward } from "../reward";
export class QuestReward implements Reward {
quest!: Role;
}
export interface Reward {
}
import { SkillReward } from './skill-reward';
describe('SkillReward', () => {
it('should create an instance', () => {
expect(new SkillReward()).toBeTruthy();
});
});
import { Ressource } from "../../ressource/ressource";
import { Reward } from "../reward";
export class SkillReward implements Reward {
skill!: Ressource;
}
import { RoleOccurrence } from './role-occurrence';
describe('RoleOccurrence', () => {
it('should create an instance', () => {
expect(new RoleOccurrence()).toBeTruthy();
});
});
export class RoleOccurrence {
iteration: number = 1;
min!: number;
max!:number;
}
...@@ -2,6 +2,8 @@ import { Step } from "../step/step"; ...@@ -2,6 +2,8 @@ import { Step } from "../step/step";
import { Task } from "../task/task"; import { Task } from "../task/task";
import { Ressource } from "../ressource/ressource"; import { Ressource } from "../ressource/ressource";
import { SupplementaryRole } from "../supplementary-role/supplementary-role"; import { SupplementaryRole } from "../supplementary-role/supplementary-role";
import { Reward } from "../rewards/reward";
import { RoleOccurrence } from "../role-occurrence/role-occurrence";
export class Role { export class Role {
...@@ -9,11 +11,12 @@ export class Role { ...@@ -9,11 +11,12 @@ export class Role {
questName: string = ''; questName: string = '';
description: string = ''; description: string = '';
educationnalObjectives: string[] = ['']; educationnalObjectives: string[] = [''];
rewards: string = ''; rewards: Reward[] = [];
stuff: string = ''; stuff: string = '';
ressources: Ressource[] = []; ressources: Ressource[] = [];
supplementaryRoles: SupplementaryRole[] = []; supplementaryRoles: SupplementaryRole[] = [];
comments: Comment[] = []; comments: Comment[] = [];
occurences: RoleOccurrence[] = [new RoleOccurrence()]
tasks: Task[][] = [ tasks: Task[][] = [
[new Task('normal')] [new Task('normal')]
] ]
......
...@@ -2,7 +2,7 @@ import { Character } from "../character/character"; ...@@ -2,7 +2,7 @@ import { Character } from "../character/character";
import { GameContext } from "../game-context/game-context"; import { GameContext } from "../game-context/game-context";
import { GameEducationnalObjective } from "../game-educationnal-objective/game-educationnal-objective"; import { GameEducationnalObjective } from "../game-educationnal-objective/game-educationnal-objective";
import { Mission } from "../mission/mission"; import { Mission } from "../mission/mission";
import { Step } from "../step/step"; import { Ressource } from "../ressource/ressource";
export class Scenario { export class Scenario {
...@@ -10,4 +10,6 @@ export class Scenario { ...@@ -10,4 +10,6 @@ export class Scenario {
context: GameContext = new GameContext(); context: GameContext = new GameContext();
missions: Mission[] = [new Mission()]; missions: Mission[] = [new Mission()];
characters: Character[] = []; characters: Character[] = [];
gameRules: string = '';
ressources: Ressource[] = [new Ressource()];
} }
\ No newline at end of file
...@@ -14,10 +14,10 @@ export class Task { ...@@ -14,10 +14,10 @@ export class Task {
duration: number = 1; duration: number = 1;
durationUnite: string = 'UT'; durationUnite: string = 'UT';
comments: Comment[] = []; comments: Comment[] = [];
character: Character | null = null; character!: Character;
repeat: Repeat = new Repeat(); repeat: Repeat = new Repeat();
supplementaryRole: SupplementaryRole | null = null; supplementaryRole!: SupplementaryRole;
interrupt: string = ''; interrupt: string = '';
constructor(type: string) { constructor(type: string) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment