New fighting system for 2 opponents

New fighting system for 2 opponents
This commit is contained in:
Ben987 2017-12-13 22:08:01 -05:00
parent 3d3fa202e9
commit 7d10efee10
42 changed files with 432 additions and 18 deletions

Binary file not shown.

After

(image error) Size: 158 KiB

Binary file not shown.

After

(image error) Size: 151 KiB

BIN
Backgrounds/Lockers.jpeg Normal file

Binary file not shown.

After

(image error) Size: 326 KiB

View file

@ -39,3 +39,6 @@ Stage,LoveReq,SubReq,VarReq,IntroText,Image
250,0,0,,,LockersOpen.jpg
260,0,0,,,LockersOpen.jpg
300,0,0,,,LockersOpen.jpg
400,0,0,,Miss! Please! We surrender!|How can you be so strong?,Lockers.jpg
410,0,0,,,Lockers.jpg
420,0,0,,,Lockers.jpg

1 Stage LoveReq SubReq VarReq IntroText Image
39 250 0 0 LockersOpen.jpg
40 260 0 0 LockersOpen.jpg
41 300 0 0 LockersOpen.jpg
42 400 0 0 Miss! Please! We surrender!|How can you be so strong? Lockers.jpg
43 410 0 0 Lockers.jpg
44 420 0 0 Lockers.jpg

Binary file not shown.

After

(image error) Size: 66 KiB

View file

@ -6,6 +6,7 @@ var C010_Revenge_AmandaSarah_ItemStolen = false;
var C010_Revenge_AmandaSarah_WasBelted = false;
var C010_Revenge_AmandaSarah_MasturbateCount = 0;
var C010_Revenge_AmandaSarah_IntroText = "";
var C010_Revenge_AmandaSarah_AllowFight = true;
// Chapter 10 - Amanda and Sarah Revenge Load
function C010_Revenge_AmandaSarah_Load() {
@ -34,8 +35,8 @@ function C010_Revenge_AmandaSarah_Run() {
// Build the text interactions
BuildInteraction(C010_Revenge_AmandaSarah_CurrentStage);
// Before 100 we don't show the player and the girls can leave
if (C010_Revenge_AmandaSarah_CurrentStage < 100) {
// Before 100 we don't show the player and the girls can leave, same for 400 or up
if ((C010_Revenge_AmandaSarah_CurrentStage < 100) || (C010_Revenge_AmandaSarah_CurrentStage >= 400)) {
if (!C010_Revenge_AmandaSarah_AmandaGone && !C010_Revenge_AmandaSarah_SarahGone) {
if (CurrentActor == "Amanda") {
DrawActor("Sarah", 800, 50, 0.8);
@ -61,8 +62,8 @@ function C010_Revenge_AmandaSarah_Run() {
DrawActor("Player", 600, 0, 1.0);
}
// Between 170 and 190, Amanda & Sarah are leaning on the lockers
if (((C010_Revenge_AmandaSarah_CurrentStage >= 170) && (C010_Revenge_AmandaSarah_CurrentStage <= 190)) || (C010_Revenge_AmandaSarah_CurrentStage >= 210)) {
// Between 170 and 190, 210 and 300, Amanda & Sarah are leaning on the lockers
if (((C010_Revenge_AmandaSarah_CurrentStage >= 170) && (C010_Revenge_AmandaSarah_CurrentStage <= 190)) || ((C010_Revenge_AmandaSarah_CurrentStage >= 210) && (C010_Revenge_AmandaSarah_CurrentStage <= 300))) {
ActorSpecificSetPose("Amanda", "LeaningRight");
ActorSpecificSetPose("Sarah", "LeaningLeft");
DrawActor("Amanda", 475, 25, 0.8);
@ -71,7 +72,7 @@ function C010_Revenge_AmandaSarah_Run() {
// Between 170 and 180, draw the player in front of the locker, at 190 or more she's inside
if ((C010_Revenge_AmandaSarah_CurrentStage >= 170) && (C010_Revenge_AmandaSarah_CurrentStage <= 180)) DrawActor("Player", 600, 150, 1.0);
if (C010_Revenge_AmandaSarah_CurrentStage >= 190) DrawActor("Player", 690, 20, 0.75);
if ((C010_Revenge_AmandaSarah_CurrentStage >= 190) && (C010_Revenge_AmandaSarah_CurrentStage <= 300)) DrawActor("Player", 690, 20, 0.75);
}
@ -92,9 +93,9 @@ function C010_Revenge_AmandaSarah_Click() {
// Chapter 10 - Amanda and Sarah Revenge - Switch the focus to another actor
function C010_Revenge_AmandaSarah_SwitchFocus(ActorToFocus) {
ActorSetPose("Angry");
if (C010_Revenge_AmandaSarah_CurrentStage < 400) ActorSetPose("Angry");
ActorLoad(ActorToFocus, "");
ActorSetPose("Furious");
if (C010_Revenge_AmandaSarah_CurrentStage < 400) ActorSetPose("Furious");
LeaveIcon = "";
}
@ -170,10 +171,45 @@ function C010_Revenge_AmandaSarah_StealItems() {
}
// Chapter 10 - Amanda and Sarah Revenge - Recover the stolen items and clothes
function C010_Revenge_AmandaSarah_RecoverItems() {
C010_Revenge_AmandaSarah_ItemStolen = false;
PlayerRestoreAllInventory();
CurrentTime = CurrentTime + 50000;
PlayerClothes("Clothed");
}
// Chapter 10 - Amanda and Sarah Revenge - Starts the fight 2 VS 1
function C010_Revenge_AmandaSarah_StartFight() {
ActorSpecificChangeAttitude("Amanda", -2, 1);
ActorSpecificChangeAttitude("Sarah", -2, 1);
// Sets the fight difficulty
var AmandaDifficulty = "Normal";
var SarahDifficulty = "Easy";
if (ActorSpecificGetValue("Amanda", ActorSubmission) < 0) AmandaDifficulty = "Hard";
if (ActorSpecificGetValue("Sarah", ActorSubmission) < 0) SarahDifficulty = "Normal";
// Launch the double fight
DoubleFightLoad("Amanda", AmandaDifficulty, "Punch", "Sarah", SarahDifficulty, "Punch", "Lockers", "C010_Revenge_AmandaSarah_EndFight");
}
// Chapter 10 - Amanda and Sarah Revenge - When the fight ends
function C010_Revenge_AmandaSarah_EndFight(Victory) {
// Change the girls attitude depending on the victory or defeat
ActorSpecificChangeAttitude("Amanda", -2, Victory ? 2 : -2);
ActorSpecificChangeAttitude("Sarah", -2, Victory ? 2 : -2);
C010_Revenge_AmandaSarah_AllowFight = false;
// On a victory, we jump to stage 400 right away, on a defeat, we show a custom text
if (Victory) {
ActorLoad("Amanda", "");
LeaveIcon = "";
ActorSpecificSetPose("Amanda", "Surrender");
ActorSpecificSetPose("Sarah", "Surrender");
C010_Revenge_AmandaSarah_CurrentStage = 400;
} else OverridenIntroText = GetText("FightDefeat" + C010_Revenge_AmandaSarah_CurrentStage.toString());
}
// Chapter 10 - Amanda and Sarah Revenge - When the player strips

View file

@ -47,7 +47,7 @@ Stage,LoveReq,SubReq,VarReq,Interaction,Result,NextStage,LoveMod,SubMod,Function
60,0,0,,"Ok, but don't steal.|(Drop your items.)","Very good, and now you|will strip for us, get naked.",80,1,-1,StealItems()
60,0,0,,Yes Miss.|(Drop your items.),"Good girl, and now you|will strip for us, get naked.",80,1,-2,StealItems()
60,0,20,,Amanda. Shut up|and kneel for me.,Errr... What Miss? Kneel?|(She blushes and seems confused.),71,0,0,"CalmDown(""Amanda"")"
70,0,0,,You want to fight?|Then let's fight!,,70,0,0,StartFight()
70,0,0,AllowFight,You want to fight?|Then let's fight!,,70,0,0,StartFight()
70,0,0,,You'll pay later.|(Drop your items.),"Shut up and strip, get naked.",80,0,0,StealItems()
70,0,0,,Ok but don't steal.|(Drop your items.),"Very good, and now you|will strip for us, get naked.",80,0,-1,StealItems()
70,0,20,,Amanda. Shut up|and kneel for me.,Errr... What Miss? Kneel?|(She blushes and seems confused.),71,0,0,"CalmDown(""Amanda"")"
@ -68,7 +68,7 @@ Stage,LoveReq,SubReq,VarReq,Interaction,Result,NextStage,LoveMod,SubMod,Function
80,0,0,,You perverts!|I'm not stripping.,We're not asking you. You will|strip up or we will beat you up.,90,-1,0,
80,0,0,,Alright Miss.|(Strip naked.),Very good. (They smile while you|strip in the empty school hall.),100,0,-1,PlayerStrip()
80,0,0,,I guess it's fair.|(Strip naked.),Very fair. (They smile while you|strip in the empty school hall.),100,1,-1,PlayerStrip()
90,0,0,,You want to fight?|Then let's fight!,,90,0,0,StartFight()
90,0,0,AllowFight,You want to fight?|Then let's fight!,,90,0,0,StartFight()
90,0,0,,I'll get you later.|(Strip naked.),Shut up! (They smile while you|strip in the empty school hall.),100,0,0,PlayerStrip()
90,0,0,,"Ok, don't hurt me.|(Strip naked.)",We won't. (They smile while you|strip in the empty school hall.),100,0,-1,PlayerStrip()
100,0,0,Common_PlayerChaste,What's so funny?,The belt! You're wearing a chastity belt!,110,0,-1,
@ -85,8 +85,8 @@ Stage,LoveReq,SubReq,VarReq,Interaction,Result,NextStage,LoveMod,SubMod,Function
130,0,0,,What the fuck?,"It's a chastity belt, and it will|stay locked on you for a long while.",140,-1,0,
130,0,0,,Sweet! That's|a chastity belt?,Yes! And it will be locked|on you for a long while.,140,1,-1,
130,0,0,,Put that belt|back in your bag.,Oh hell no! This chastity belt|will be locked on you for a long while.,140,0,1,
140,0,0,,Fuck you! I will|fight you both!,,140,0,0,StartFight()
140,0,0,,Fine! Lock the|stupid belt.,,150,0,0,LockBelt()
140,0,0,AllowFight,Fuck you! I will|fight you both!,,140,0,0,StartFight()
140,0,0,,Fine! Lock the|stupid belt.,(She hums a happy song while locks|the belt around your hips and crotch.),150,0,0,LockBelt()
140,0,0,,Nice! I love|chastity belts.,I love them too! (She locks the|belt around your hips and crotch.),150,1,-1,LockBelt()
150,0,0,,(Tug on the belt.),The belt isn't your biggest problem.|Since we will lock you up now.,160,0,0,BeltComment()
150,0,0,,You better have the key!,The key isn't your biggest problem.|Since we will lock you up now.,160,0,1,BeltComment()
@ -99,7 +99,7 @@ Stage,LoveReq,SubReq,VarReq,Interaction,Result,NextStage,LoveMod,SubMod,Function
170,0,0,,No way! Are|you two insane?,Shut up and step in|before we force you.,180,-1,0,
170,0,0,,"Ok, but not for long.|(Step in the locker.)",(You squeeze yourself in the locker.)|It will be fine. Any last words?,190,1,-1,"EnterLocker(""Player"")"
170,0,0,,I understand Miss.|(Step in the locker.),(You squeeze yourself in the locker.)|You will be alright. Any last words?,190,0,-2,"EnterLocker(""Player"")"
180,0,0,,Never! I will|fight you both!,,180,0,0,StartFight()
180,0,0,AllowFight,Never! I will|fight you both!,,180,0,0,StartFight()
180,0,0,,Fine! I'll do it.|(Step in the locker.),(You squeeze yourself in the locker.)|You will be alright. Any last words?,190,0,0,"EnterLocker(""Player"")"
180,0,0,,"Ok, I surrender.|(Step in the locker.)",(You squeeze yourself in the locker.)|You will be alright. Any last words?,190,0,-1,"EnterLocker(""Player"")"
190,0,0,,Wait! Let's negotiate!,Negotiation time is over!|(She slams the door and locks it.),200,0,-1,"CloseLocker(""Player"")"
@ -134,3 +134,14 @@ Stage,LoveReq,SubReq,VarReq,Interaction,Result,NextStage,LoveMod,SubMod,Function
300,0,0,WasBelted,Wait! What|about the belt?,"Oh yes, the belt. Well come and see us|after class. We'll talk about it some more.",300,0,0,RemoveWasBelted()
300,0,0,Common_PlayerNaked,(Dress up and leave.),,300,0,0,EndChapter()
300,0,0,Common_PlayerClothed,(Pick your items|and leave.),,300,0,0,EndChapter()
400,0,0,WasBelted,Shut up and|unlock that belt.,"Sorry, I cannot unlock it now|but I will help you after class.",410,-1,1,
400,0,0,WasBelted,Can you unlock|the belt now?,"Sorry, I cannot unlock it now|but I will help you after class.",410,0,0,
400,0,0,,I'm not that strong.|You two are pathetic.,Oh my god. I guess we|need to train with Jennifer.,410,-1,0,
400,0,0,,I've been fighting|for years girl.,Oh my. We never had a chance.,410,0,1,
400,0,0,,I got lucky.,Wow! That was some crazy luck.,410,1,-1,
410,0,0,ItemStolen,Where are|my items?,"It's right here, you can have it.|(You take back all your possessions.)",410,0,0,RecoverItems()
410,0,0,ItemStolen,Give me back|my stuff now!,Oh yes! We were not going to steal it.|(You take back all your possessions.),410,0,1,RecoverItems()
410,0,0,!ItemStolen,Now you know|who's the boss.,(Amanda nods and steps back.)|Yes Miss. We won't try that again.,420,0,1,"SwitchFocus(""Sarah"")"
410,0,0,!ItemStolen,I hope I did|not hurt you.,(Amanda shakes her head and steps back.)|It's fine. All that was hurt is our pride.,420,1,0,"SwitchFocus(""Sarah"")"
410,0,0,!ItemStolen,I need to go now.|(Leave them behind.),,410,0,0,"EarlyEnding(""FightVictory"")"
420,0,0,,I need to go now.|(Leave them behind.),,420,0,0,"EarlyEnding(""FightVictory"")"

1 Stage LoveReq SubReq VarReq Interaction Result NextStage LoveMod SubMod Function
47 60 0 0 Ok, but don't steal.|(Drop your items.) Very good, and now you|will strip for us, get naked. 80 1 -1 StealItems()
48 60 0 0 Yes Miss.|(Drop your items.) Good girl, and now you|will strip for us, get naked. 80 1 -2 StealItems()
49 60 0 20 Amanda. Shut up|and kneel for me. Errr... What Miss? Kneel?|(She blushes and seems confused.) 71 0 0 CalmDown("Amanda")
50 70 0 0 AllowFight You want to fight?|Then let's fight! 70 0 0 StartFight()
51 70 0 0 You'll pay later.|(Drop your items.) Shut up and strip, get naked. 80 0 0 StealItems()
52 70 0 0 Ok but don't steal.|(Drop your items.) Very good, and now you|will strip for us, get naked. 80 0 -1 StealItems()
53 70 0 20 Amanda. Shut up|and kneel for me. Errr... What Miss? Kneel?|(She blushes and seems confused.) 71 0 0 CalmDown("Amanda")
68 80 0 0 You perverts!|I'm not stripping. We're not asking you. You will|strip up or we will beat you up. 90 -1 0
69 80 0 0 Alright Miss.|(Strip naked.) Very good. (They smile while you|strip in the empty school hall.) 100 0 -1 PlayerStrip()
70 80 0 0 I guess it's fair.|(Strip naked.) Very fair. (They smile while you|strip in the empty school hall.) 100 1 -1 PlayerStrip()
71 90 0 0 AllowFight You want to fight?|Then let's fight! 90 0 0 StartFight()
72 90 0 0 I'll get you later.|(Strip naked.) Shut up! (They smile while you|strip in the empty school hall.) 100 0 0 PlayerStrip()
73 90 0 0 Ok, don't hurt me.|(Strip naked.) We won't. (They smile while you|strip in the empty school hall.) 100 0 -1 PlayerStrip()
74 100 0 0 Common_PlayerChaste What's so funny? The belt! You're wearing a chastity belt! 110 0 -1
85 130 0 0 What the fuck? It's a chastity belt, and it will|stay locked on you for a long while. 140 -1 0
86 130 0 0 Sweet! That's|a chastity belt? Yes! And it will be locked|on you for a long while. 140 1 -1
87 130 0 0 Put that belt|back in your bag. Oh hell no! This chastity belt|will be locked on you for a long while. 140 0 1
88 140 0 0 AllowFight Fuck you! I will|fight you both! 140 0 0 StartFight()
89 140 0 0 Fine! Lock the|stupid belt. (She hums a happy song while locks|the belt around your hips and crotch.) 150 0 0 LockBelt()
90 140 0 0 Nice! I love|chastity belts. I love them too! (She locks the|belt around your hips and crotch.) 150 1 -1 LockBelt()
91 150 0 0 (Tug on the belt.) The belt isn't your biggest problem.|Since we will lock you up now. 160 0 0 BeltComment()
92 150 0 0 You better have the key! The key isn't your biggest problem.|Since we will lock you up now. 160 0 1 BeltComment()
99 170 0 0 No way! Are|you two insane? Shut up and step in|before we force you. 180 -1 0
100 170 0 0 Ok, but not for long.|(Step in the locker.) (You squeeze yourself in the locker.)|It will be fine. Any last words? 190 1 -1 EnterLocker("Player")
101 170 0 0 I understand Miss.|(Step in the locker.) (You squeeze yourself in the locker.)|You will be alright. Any last words? 190 0 -2 EnterLocker("Player")
102 180 0 0 AllowFight Never! I will|fight you both! 180 0 0 StartFight()
103 180 0 0 Fine! I'll do it.|(Step in the locker.) (You squeeze yourself in the locker.)|You will be alright. Any last words? 190 0 0 EnterLocker("Player")
104 180 0 0 Ok, I surrender.|(Step in the locker.) (You squeeze yourself in the locker.)|You will be alright. Any last words? 190 0 -1 EnterLocker("Player")
105 190 0 0 Wait! Let's negotiate! Negotiation time is over!|(She slams the door and locks it.) 200 0 -1 CloseLocker("Player")
134 300 0 0 WasBelted Wait! What|about the belt? Oh yes, the belt. Well come and see us|after class. We'll talk about it some more. 300 0 0 RemoveWasBelted()
135 300 0 0 Common_PlayerNaked (Dress up and leave.) 300 0 0 EndChapter()
136 300 0 0 Common_PlayerClothed (Pick your items|and leave.) 300 0 0 EndChapter()
137 400 0 0 WasBelted Shut up and|unlock that belt. Sorry, I cannot unlock it now|but I will help you after class. 410 -1 1
138 400 0 0 WasBelted Can you unlock|the belt now? Sorry, I cannot unlock it now|but I will help you after class. 410 0 0
139 400 0 0 I'm not that strong.|You two are pathetic. Oh my god. I guess we|need to train with Jennifer. 410 -1 0
140 400 0 0 I've been fighting|for years girl. Oh my. We never had a chance. 410 0 1
141 400 0 0 I got lucky. Wow! That was some crazy luck. 410 1 -1
142 410 0 0 ItemStolen Where are|my items? It's right here, you can have it.|(You take back all your possessions.) 410 0 0 RecoverItems()
143 410 0 0 ItemStolen Give me back|my stuff now! Oh yes! We were not going to steal it.|(You take back all your possessions.) 410 0 1 RecoverItems()
144 410 0 0 !ItemStolen Now you know|who's the boss. (Amanda nods and steps back.)|Yes Miss. We won't try that again. 420 0 1 SwitchFocus("Sarah")
145 410 0 0 !ItemStolen I hope I did|not hurt you. (Amanda shakes her head and steps back.)|It's fine. All that was hurt is our pride. 420 1 0 SwitchFocus("Sarah")
146 410 0 0 !ItemStolen I need to go now.|(Leave them behind.) 410 0 0 EarlyEnding("FightVictory")
147 420 0 0 I need to go now.|(Leave them behind.) 420 0 0 EarlyEnding("FightVictory")

View file

@ -12,3 +12,7 @@ LearnLesson,(The locker opens and Amanda smiles.)|So have you learned a lesson t
Orgasm,"(You stimulate yourself right on the spot and|tremble with exctasy, getting a great orgasm.)"
OrgasmEnough,(You play with yourself but you're out of ideas.|It's too uncomfortable for a second orgasm.)
OrgasmRepeat,(The touch yourself and the vibrating egg kicks|in to give you desires for another round.)
FightDefeat70,"Girl, you cannot fight both of us.|Now shut up and drop your stuff!"
FightDefeat90,"Girl, you cannot fight both of us.|Now shut up and get naked!"
FightDefeat140,"Girl, you cannot fight both of us.|We will lock that chastity belt on you."
FightDefeat180,"Girl, you cannot fight both of us.|You will step in that locker."

1 Tag Content
12 Orgasm (You stimulate yourself right on the spot and|tremble with exctasy, getting a great orgasm.)
13 OrgasmEnough (You play with yourself but you're out of ideas.|It's too uncomfortable for a second orgasm.)
14 OrgasmRepeat (The touch yourself and the vibrating egg kicks|in to give you desires for another round.)
15 FightDefeat70 Girl, you cannot fight both of us.|Now shut up and drop your stuff!
16 FightDefeat90 Girl, you cannot fight both of us.|Now shut up and get naked!
17 FightDefeat140 Girl, you cannot fight both of us.|We will lock that chastity belt on you.
18 FightDefeat180 Girl, you cannot fight both of us.|You will step in that locker.

View file

@ -5,5 +5,13 @@ Alone3,But it was worth it to teach them a lesson.
Alone4,The next class will be available later.
Locker1,You walk the hallways with a smirk on your face.
Locker2,Amanda and Sarah might have got you a little late.
Locker3,But it was worth it to see her stuggle in that locker.
Locker3,But it was worth it to see her struggle in that locker.
Locker4,The next class will be available in another version.
FightVictory1,You walk the hallways and strech your mustles.
FightVictory2,Amanda and Sarah might have got you a little late.
FightVictory3,But it was worth it to crush them both in a fight.
FightVictory4,The next class will be available in another version.
DoubleLocker1,You walk the hallways with a big smile on your face.
DoubleLocker2,Amanda and Sarah might have got you a little late.
DoubleLocker3,But it was worth it to see them struggle in their lockers.
DoubleLocker4,The next class will be available in another version.

1 Tag Content
5 Alone4 The next class will be available later.
6 Locker1 You walk the hallways with a smirk on your face.
7 Locker2 Amanda and Sarah might have got you a little late.
8 Locker3 But it was worth it to see her stuggle in that locker. But it was worth it to see her struggle in that locker.
9 Locker4 The next class will be available in another version.
10 FightVictory1 You walk the hallways and strech your mustles.
11 FightVictory2 Amanda and Sarah might have got you a little late.
12 FightVictory3 But it was worth it to crush them both in a fight.
13 FightVictory4 The next class will be available in another version.
14 DoubleLocker1 You walk the hallways with a big smile on your face.
15 DoubleLocker2 Amanda and Sarah might have got you a little late.
16 DoubleLocker3 But it was worth it to see them struggle in their lockers.
17 DoubleLocker4 The next class will be available in another version.

Binary file not shown.

After

(image error) Size: 110 KiB

Binary file not shown.

After

(image error) Size: 168 KiB

Binary file not shown.

After

(image error) Size: 158 KiB

Binary file not shown.

After

(image error) Size: 158 KiB

Binary file not shown.

After

(image error) Size: 149 KiB

Binary file not shown.

After

(image error) Size: 170 KiB

Binary file not shown.

After

(image error) Size: 162 KiB

Binary file not shown.

After

(image error) Size: 146 KiB

Binary file not shown.

After

(image error) Size: 137 KiB

Binary file not shown.

After

(image error) Size: 144 KiB

Binary file not shown.

After

(image error) Size: 175 KiB

Binary file not shown.

After

(image error) Size: 143 KiB

Binary file not shown.

After

(image error) Size: 119 KiB

Binary file not shown.

After

(image error) Size: 154 KiB

Binary file not shown.

After

(image error) Size: 142 KiB

Binary file not shown.

After

(image error) Size: 137 KiB

Binary file not shown.

After

(image error) Size: 122 KiB

Binary file not shown.

After

(image error) Size: 145 KiB

Binary file not shown.

After

(image error) Size: 144 KiB

Binary file not shown.

After

(image error) Size: 148 KiB

Binary file not shown.

After

(image error) Size: 139 KiB

Binary file not shown.

After

(image error) Size: 160 KiB

Binary file not shown.

After

(image error) Size: 150 KiB

Binary file not shown.

After

(image error) Size: 141 KiB

Binary file not shown.

After

(image error) Size: 115 KiB

View file

@ -0,0 +1,299 @@
// Fight parameters
var DoubleFightTimer = 0;
var DoubleFightStartTime = 5000;
var DoubleFightEnded = false;
var DoubleFightVictory = false;
var DoubleFightEndFunction = "";
var DoubleFightPerfect = true;
var DoubleFightOpponent1 = {};
var DoubleFightOpponent2 = {};
var DoubleFightText;
var DoubleFightBackupChapter = "";
var DoubleFightBackupScreen = "";
// Generates a full fight sequence
function DoubleFightGenerateMoves(StartTime, DifficultyText) {
// Set the difficulty ratio
var DifficultyRatio = 1;
if (DifficultyText == "Easy") DifficultyRatio = 1.5;
if (DifficultyText == "Hard") DifficultyRatio = 0.6667;
// Full the fight sequence
var CurTimer = StartTime + 3000;
var Seq = 0;
DoubleFightMoves = [];
while (Seq < MaxFightSequence) {
// Create a new fight move to do at a random position
DoubleFightMoves[DoubleFightMoves.length] = [Math.floor(Math.random() * 4), CurTimer];
CurTimer = CurTimer + Math.floor((Math.random() * 800 + 400) * DifficultyRatio);
Seq++;
}
// Returns the fight move set
return DoubleFightMoves;
}
// Load the fight animations and full sequence
function DoubleFightLoad(Opp1ActorName, Opp1Difficulty, Opp1Icon, Opp2ActorName, Opp2Difficulty, Opp2Icon, BackgroundImage, EndFunction) {
// Creates a brand new fight
LeaveIcon = "";
DoubleFightTimer = 0;
DoubleFightEnded = false;
DoubleFightPerfect = true;
DoubleFightEndFunction = EndFunction;
DoubleFightBackgroundImage = BackgroundImage;
if (DoubleFightText == null) ReadCSV("DoubleFightText", "C999_Common/Fights/Text_" + CurrentLanguageTag + ".csv");
// Setup the 2 opponents
DoubleFightOpponent1 = { ActorName:Opp1ActorName, DifficultyText:Opp1Difficulty, FightIcon:Opp1Icon, LastMoveType:-1, LastMoveTypeTimer:-1, FightProgress:-1, FightMoves:DoubleFightGenerateMoves(DoubleFightStartTime, Opp1Difficulty), FightMoveTypeKeyUpper:[65, 83, 68, 70], FightMoveTypeKeyLower:[97, 115, 100, 102], FightXOffset:0, ImageXOffset:220, ImageName:"", NextImageTime:-1 };
DoubleFightOpponent2 = { ActorName:Opp2ActorName, DifficultyText:Opp2Difficulty, FightIcon:Opp2Icon, LastMoveType:-1, LastMoveTypeTimer:-1, FightProgress:-1, FightMoves:DoubleFightGenerateMoves(DoubleFightStartTime, Opp2Difficulty), FightMoveTypeKeyUpper:[72, 74, 75, 76], FightMoveTypeKeyLower:[104, 106, 107, 108], FightXOffset:900, ImageXOffset:520, ImageName:"", NextImageTime:-1 };
// Keep a backup of the current chapter and screen
DoubleFightBackupChapter = CurrentChapter;
DoubleFightBackupScreen = CurrentScreen;
CurrentChapter = "C999_Common";
CurrentScreen = "DoubleFight";
}
// Draw the fight icons
function DoubleFightDrawIcons(ctx, Opponent) {
// Scroll the fight icons with time
var Seq = 0;
while (Seq < Opponent.FightMoves.length) {
// Draw the move from 3 seconds before to 1 second after
if ((Opponent.FightMoves[Seq][FightMoveTime] <= DoubleFightTimer + 3000) && (Opponent.FightMoves[Seq][FightMoveTime] >= DoubleFightTimer - 1000))
DrawImage(ctx, "C999_Common/Fights/Icons/" + Opponent.FightIcon + ".png", Opponent.FightXOffset + 3 + (Opponent.FightMoves[Seq][FightMoveType] * 75), 410 + Math.floor((DoubleFightTimer - Opponent.FightMoves[Seq][FightMoveTime]) / 6));
// Remove the move from the sequence if it's past due
if (Opponent.FightMoves[Seq][FightMoveTime] < DoubleFightTimer - 1000) {
Opponent.FightMoves.splice(Seq, 1);
DoubleFightMiss(Opponent);
}
else Seq = Seq + 1;
// Beyond 3 seconds forward, we exit
if (Seq < Opponent.FightMoves.length)
if (Opponent.FightMoves[Seq][FightMoveTime] > DoubleFightTimer + 3000)
return;
}
}
// Draw the fight bars to tell when the moves will hit
function DoubleFightDrawBar(ctx, Opponent) {
// Draw 4 bars per opponent
for(BarNum = 0; BarNum <= 3; BarNum++) {
// The color changes when it's clicked or pressed
DrawRect(ctx, Opponent.FightXOffset + 3 + (BarNum * 75), 437, 70, 27, "White");
if ((Opponent.LastMoveType == BarNum) && (Opponent.LastMoveTypeTimer >= DoubleFightTimer))
DrawRect(ctx, Opponent.FightXOffset + 4 + (BarNum * 75), 438, 68, 25, "#66FF66");
else
DrawRect(ctx, Opponent.FightXOffset + 4 + (BarNum * 75), 438, 68, 25, "Red");
if (!IsMobile) DrawText(ctx, String.fromCharCode(Opponent.FightMoveTypeKeyUpper[BarNum]), Opponent.FightXOffset + 36 + (BarNum * 75), 451, "white");
}
}
// Draw the fight progress in the bottom of the fight scene
function DoubleFightDrawProgress(ctx, Opponent) {
DrawRect(ctx, Opponent.FightXOffset, 590, 300, 1, "white");
DrawRect(ctx, Opponent.FightXOffset, 591, Opponent.FightProgress * 3, 9, "#66FF66");
DrawRect(ctx, Opponent.FightXOffset + (Opponent.FightProgress * 3), 591, (100 - Opponent.FightProgress) * 3, 9, "red");
}
// Draw the opponent actor on the screen
function DoubleFightDrawOpponent(ctx, Opponent) {
// Before the timer, we use the previous image
if (Opponent.NextImageTime < DoubleFightTimer) {
// The image file is constructed based on the actor clothes and winning position
Opponent.NextImageTime = DoubleFightTimer + 1000 + Math.round(Math.random() * 2000);
Opponent.ImageName = "C999_Common/Fights/Actors/" + Opponent.ActorName + "/" + ActorSpecificGetValue(Opponent.ActorName, ActorCloth) + "_";
if (Opponent.FightProgress == -1) Opponent.ImageName = Opponent.ImageName + "Provoke.png";
if (Opponent.FightProgress == 100) Opponent.ImageName = Opponent.ImageName + "Defeat.png";
if (Opponent.FightProgress == 0) Opponent.ImageName = Opponent.ImageName + "Victory.png";
if ((Opponent.FightProgress >= 1) && (Opponent.FightProgress <= 33)) Opponent.ImageName = Opponent.ImageName + "Winning" + ((Math.round(new Date().getTime() / 3000) % 3) + 1).toString() + ".png";
if ((Opponent.FightProgress >= 34) && (Opponent.FightProgress <= 66)) Opponent.ImageName = Opponent.ImageName + "Even" + ((Math.round(new Date().getTime() / 3000) % 3) + 1).toString() + ".png";
if ((Opponent.FightProgress >= 67) && (Opponent.FightProgress <= 99)) Opponent.ImageName = Opponent.ImageName + "Losing" + ((Math.round(new Date().getTime() / 3000) % 3) + 1).toString() + ".png";
};
// Draw the image on the screen
DrawImageZoom(ctx, Opponent.ImageName, 0, 0, 600, 900, Opponent.ImageXOffset, 50, 600 * 0.75, 900 * 0.75);
}
// Renders a specific opponent
function DoubleFightRenderOpponent(ctx, Opponent) {
// Starts the fight at an even level and generates moves if there'S none left
if (Opponent.FightProgress > 100) Opponent.FightProgress = 100;
if ((Opponent.FightProgress == -1) && (DoubleFightTimer >= DoubleFightStartTime)) Opponent.FightProgress = 50;
if ((Opponent.FightMoves.length == 0) && !DoubleFightEnded && Opponent.FightProgress > 0) Opponent.FightMoves = DoubleFightGenerateMoves(DoubleFightTimer, Opponent.DifficultyText);
// Draw the fighting actors
DoubleFightDrawOpponent(ctx, Opponent);
// Draw the fight icons, bars and bottom info when the fight is running
if (!DoubleFightEnded) {
if (DoubleFightTimer >= DoubleFightStartTime) {
if (Opponent.FightProgress < 100) {
DoubleFightDrawBar(ctx, Opponent);
DoubleFightDrawIcons(ctx, Opponent);
DoubleFightDrawProgress(ctx, Opponent);
}
}
else {
DrawText(ctx, GetCSVText(DoubleFightText, "Opponent") + " " + Opponent.ActorName, Opponent.FightXOffset + 150, 250, "white");
DrawText(ctx, GetCSVText(DoubleFightText, "Difficulty") + " " + GetCSVText(DoubleFightText, Opponent.DifficultyText), Opponent.FightXOffset + 150, 350, "white");
}
}
}
// Ends the fight and sends the result back to the screen
function DoubleFightEnd(Victory) {
DoubleFightOpponent1.NextImageTime = -1;
DoubleFightOpponent2.NextImageTime = -1;
if (DoubleFightOpponent1.FightProgress < 100) DoubleFightOpponent1.FightProgress = Victory ? 100 : 0;
if (DoubleFightOpponent2.FightProgress < 100) DoubleFightOpponent2.FightProgress = Victory ? 100 : 0;
DoubleFightEnded = true;
DoubleFightVictory = Victory;
}
// When the player hits
function DoubleFightHit(Opponent) {
Opponent.FightProgress = Opponent.FightProgress + 2;
if (Opponent.FightProgress >= 100) Opponent.NextImageTime = -1;
if ((DoubleFightOpponent1.FightProgress >= 100) && (DoubleFightOpponent2.FightProgress >= 100)) DoubleFightEnd(true);
}
// When the player misses (the penalty is greater on higher difficulties)
function DoubleFightMiss(Opponent) {
DoubleFightPerfect = false;
if (Opponent.DifficultyText == "Easy") Opponent.FightProgress = Opponent.FightProgress - 2;
if (Opponent.DifficultyText == "Normal") Opponent.FightProgress = Opponent.FightProgress - 3;
if (Opponent.DifficultyText == "Hard") Opponent.FightProgress = Opponent.FightProgress - 4;
if (Opponent.FightProgress <= 0) DoubleFightEnd(false);
}
// When the player tries a specific move type
function DoubleFightDoMove(Opponent, MoveType) {
// Make sure the hit is valid
if ((MoveType >= 0) && (Opponent.FightMoves.length > 0) && (Opponent.FightProgress > 0) && (Opponent.FightProgress < 100)) {
// For each moves in the list
var Hit = false;
var Seq = 0;
while (Seq < Opponent.FightMoves.length) {
// If the move connects (good timing and good type)
if ((Opponent.FightMoves[Seq][FightMoveTime] <= DoubleFightTimer + 300) && (Opponent.FightMoves[Seq][FightMoveTime] >= DoubleFightTimer - 300) && (MoveType == Opponent.FightMoves[Seq][FightMoveType])) {
Opponent.FightMoves.splice(Seq, 1);
Hit = true;
}
else Seq++;
// Beyond 0.5 seconds forward, we give up
if (Seq < Opponent.FightMoves.length)
if (Opponent.FightMoves[Seq][FightMoveTime] > DoubleFightTimer + 300)
Seq = Opponent.FightMoves.length;
}
// Depending on hit or miss, we change the progress of the fight
Opponent.LastMoveType = MoveType;
Opponent.LastMoveTypeTimer = DoubleFightTimer + 200;
if (Hit) DoubleFightHit(Opponent);
else DoubleFightMiss(Opponent);
// Each hit or miss add 5 seconds to the game clock
CurrentTime = CurrentTime + 5000;
}
}
// Checks if the key is a valid fight move for an opponent
function DoubleFightCheckKey(Opponent) {
var MoveType = -1;
if ((KeyPress == Opponent.FightMoveTypeKeyUpper[0]) || (KeyPress == Opponent.FightMoveTypeKeyLower[0])) MoveType = 0;
if ((KeyPress == Opponent.FightMoveTypeKeyUpper[1]) || (KeyPress == Opponent.FightMoveTypeKeyLower[1])) MoveType = 1;
if ((KeyPress == Opponent.FightMoveTypeKeyUpper[2]) || (KeyPress == Opponent.FightMoveTypeKeyLower[2])) MoveType = 2;
if ((KeyPress == Opponent.FightMoveTypeKeyUpper[3]) || (KeyPress == Opponent.FightMoveTypeKeyLower[3])) MoveType = 3;
DoubleFightDoMove(Opponent, MoveType);
}
// When a click is done on a mobile device, we send it to hit or miss
function DoubleFightCheckClick(Opponent) {
var MoveType = -1;
if ((MouseX >= Opponent.FightXOffset) && (MouseX <= Opponent.FightXOffset + 300) && (MouseY >= 400) && (MouseY <= 500)) MoveType = Math.round((MouseX - Opponent.FightXOffset) / 75);
DoubleFightDoMove(Opponent, MoveType);
}
// Render the double fight scene
function C999_Common_DoubleFight_Run() {
// Paints the background
var ctx = document.getElementById("MainCanvas").getContext("2d");
DrawImage(ctx, "C999_Common/Fights/Backgrounds/" + DoubleFightBackgroundImage + ".jpg", 0, 0);
// Increments the fight timer and renders the 2 opponents
DoubleFightTimer = DoubleFightTimer + RunInterval;
DoubleFightRenderOpponent(ctx, DoubleFightOpponent1);
DoubleFightRenderOpponent(ctx, DoubleFightOpponent2);
// Draw the fight icons and bottom info when the fight is running
if (!DoubleFightEnded && (DoubleFightTimer < DoubleFightStartTime)) DrawText(ctx, GetCSVText(DoubleFightText, "StartsIn") + " " + (5 - Math.floor(DoubleFightTimer / 1000)).toString(), 600, 30, "white");
// Draw the end text
if (DoubleFightEnded) {
if ((DoubleFightOpponent1.FightProgress >= 100) && (DoubleFightOpponent2.FightProgress >= 100) && DoubleFightPerfect) DrawText(ctx, GetCSVText(DoubleFightText, "Perfect"), 600, 30, "white");
if ((DoubleFightOpponent1.FightProgress >= 100) && (DoubleFightOpponent2.FightProgress >= 100) && !DoubleFightPerfect) DrawText(ctx, GetCSVText(DoubleFightText, "Victory"), 600, 30, "white");
if ((DoubleFightOpponent1.FightProgress <= 0) || (DoubleFightOpponent2.FightProgress <= 0)) DrawText(ctx, GetCSVText(DoubleFightText, "Defeat"), 600, 30, "white");
}
}
// When a key is pressed while fighting (for both keyboard and mobile)
function C999_Common_DoubleFight_KeyDown() {
// If the fight has started, we check the key pressed and send it as a fight move
if ((DoubleFightTimer > DoubleFightStartTime) && (DoubleFightOpponent1.FightProgress != -1) && !DoubleFightEnded) {
DoubleFightCheckKey(DoubleFightOpponent1);
DoubleFightCheckKey(DoubleFightOpponent2);
}
}
// When a click is done while fighting (only works on mobile)
function C999_Common_DoubleFight_Click() {
// If the fight is over, clicking above the opponents will end it
if (DoubleFightEnded && (MouseX >= 300) && (MouseX <= 900) && (MouseY <= 600)) {
CurrentChapter = DoubleFightBackupChapter;
CurrentScreen = DoubleFightBackupScreen;
DynamicFunction(DoubleFightEndFunction + "(" + DoubleFightVictory.toString() + ")");
}
// If the fight has started, we check the click position and send it as a fight move
if ((DoubleFightTimer > DoubleFightStartTime) && (DoubleFightOpponent1.FightProgress != -1) && !DoubleFightEnded && IsMobile) {
DoubleFightCheckClick(DoubleFightOpponent1);
DoubleFightCheckClick(DoubleFightOpponent2);
}
}

View file

@ -3,8 +3,6 @@ var MaxFightSequence = 500;
var FightProgress = -1;
var FightTimer = 0;
var FightMove = [];
var FightMoveType = 0;
var FightMoveTime = 1;
var FightAnim;
var FightAnimFrom = 0;
var FightAnimTo = 1;

Binary file not shown.

After

(image error) Size: 7.2 KiB

View file

@ -0,0 +1,11 @@
Tag,Content
Easy,Easy
Normal,Normal
Hard,Hard
StartsIn,Starts in
Opponent,Opponent:
Difficulty,Difficulty:
Perfect,Perfect fight!
Victory,You won!
Defeat,You lost!
ClickContinue,Click here to continue.
1 Tag Content
2 Easy Easy
3 Normal Normal
4 Hard Hard
5 StartsIn Starts in
6 Opponent Opponent:
7 Difficulty Difficulty:
8 Perfect Perfect fight!
9 Victory You won!
10 Defeat You lost!
11 ClickContinue Click here to continue.

View file

@ -0,0 +1,10 @@
Tag,Content
Easy,Easy
Normal,Normal
Hard,Hard
StartsIn,Starts in
Opponent,Opponent:
Difficulty,Difficulty:
Perfect,Perfect fight! Click on any opponent to continue.
Victory,You won! Click on any opponent to continue.
Defeat,You lost! Click on any opponent to continue.
1 Tag Content
2 Easy Easy
3 Normal Normal
4 Hard Hard
5 StartsIn Starts in
6 Opponent Opponent:
7 Difficulty Difficulty:
8 Perfect Perfect fight! Click on any opponent to continue.
9 Victory You won! Click on any opponent to continue.
10 Defeat You lost! Click on any opponent to continue.

View file

@ -0,0 +1,11 @@
Tag,Content
Easy,Easy
Normal,Normal
Hard,Hard
StartsIn,Starts in
Opponent,Opponent:
Difficulty,Difficulty:
Perfect,Perfect fight!
Victory,You won!
Defeat,You lost!
ClickContinue,Click here to continue.
1 Tag Content
2 Easy Easy
3 Normal Normal
4 Hard Hard
5 StartsIn Starts in
6 Opponent Opponent:
7 Difficulty Difficulty:
8 Perfect Perfect fight!
9 Victory You won!
10 Defeat You lost!
11 ClickContinue Click here to continue.

View file

@ -16,6 +16,7 @@ var KeyPress = "";
var IsMobile = false;
var TextPhase = 0;
var CSVCache = {};
var MaxFightSequence = 500;
// Array variables
var IntroStage = 0;
@ -36,6 +37,8 @@ var StageSubMod = 8;
var StageFunction = 9;
var TextTag = 0;
var TextContent = 1;
var FightMoveType = 0;
var FightMoveTime = 1;
// Common variables
var Common_BondageAllowed = true;
@ -229,6 +232,25 @@ function GetText(Tag) {
}
// Returns the text for a specific CSV associated with the tag
function GetCSVText(CSVText, Tag) {
// Make sure the text CSV file is loaded
if (CSVText != null) {
// Cycle the text to find a matching tag and returns the text content
Tag = Tag.trim().toUpperCase();
for (var T = 0; T < CSVText.length; T++)
if (CSVText[T][TextTag].trim().toUpperCase() == Tag)
return CSVText[T][TextContent].trim();
// Returns an error message
return "MISSING TEXT FOR TAG: " + Tag.trim();
} else return "";
}
// Triggers the leave or wait button if needed
function LeaveButtonClick() {

View file

@ -19,7 +19,6 @@
<script src="Actor.js"></script>
<script src="Inventory.js"></script>
<script src="Time.js"></script>
<script src="Fight.js"></script>
<script src="Struggle.js"></script>
<script src="C000_Intro/Intro/Script.js"></script>
<script src="C000_Intro/ChapterSelect/Script.js"></script>
@ -117,6 +116,8 @@
<script src="C999_Common/SleepingPill/Script.js"></script>
<script src="C999_Common/RustyHook/Script.js"></script>
<script src="C999_Common/MetalSheet/Script.js"></script>
<script src="C999_Common/Fights/Fight.js"></script>
<script src="C999_Common/Fights/DoubleFight.js"></script>
<script>
// When the code is loaded, start on "Chapter 0" to select a chapter and loads the default language