Add bear sprite and bear strategy framework.

This commit is contained in:
sigonasr2 2024-01-14 17:42:20 -06:00
parent db9c35f813
commit 3e2bd6feb6
8 changed files with 104 additions and 0 deletions

View File

@ -508,6 +508,10 @@
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="Bear.cpp">
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="BlacksmithCraftingWindow.cpp">
<SubType>
</SubType>

View File

@ -722,6 +722,9 @@
<ClCompile Include="Wolf.cpp">
<Filter>Source Files\Monster Strategies</Filter>
</ClCompile>
<ClCompile Include="Bear.cpp">
<Filter>Source Files\Monster Strategies</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="cpp.hint" />

View File

@ -0,0 +1,57 @@
#pragma region License
/*
License (OLC-3)
~~~~~~~~~~~~~~~
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions or derivations of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions or derivative works in binary form must reproduce the above
copyright notice. This list of conditions and the following disclaimer must be
reproduced in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Portions of this software are copyright © 2023 The FreeType
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
All rights reserved.
*/
#pragma endregion
#include "Monster.h"
#include "AdventuresInLestoria.h"
#include "MonsterStrategyHelpers.h"
#include "util.h"
#include "BulletTypes.h"
#include "SoundEffect.h"
INCLUDE_game
INCLUDE_BULLET_LIST
using A=Attribute;
void Monster::STRATEGY::BEAR(Monster&m,float fElapsedTime,std::string strategy){
switch(m.I(A::PHASE)){
case 0:{
}break;
}
}

View File

@ -240,6 +240,7 @@ private:
static void RUN_AWAY(Monster&m,float fElapsedTime,std::string strategy);
static void FROG(Monster&m,float fElapsedTime,std::string strategy);
static void WOLF(Monster&m,float fElapsedTime,std::string strategy);
static void BEAR(Monster&m,float fElapsedTime,std::string strategy);
};
};

View File

@ -50,6 +50,7 @@ void Monster::InitializeStrategies(){
STRATEGY_DATA.insert("Run Away",Monster::STRATEGY::RUN_AWAY);
STRATEGY_DATA.insert("Frog",Monster::STRATEGY::FROG);
STRATEGY_DATA.insert("Wolf",Monster::STRATEGY::WOLF);
STRATEGY_DATA.insert("Bear",Monster::STRATEGY::BEAR);
STRATEGY_DATA.SetInitialized();
}

View File

@ -210,4 +210,8 @@ MonsterStrategy
# The amount of time to spend disengaged.
Disengage Duration = 3.0s
}
Bear
{
}
}

View File

@ -277,4 +277,38 @@ Monsters
# Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
#ANIMATION[0] = 6, 0.1, Repeat
}
Bear
{
Health = 210
Attack = 45
CollisionDmg = 10
MoveSpd = 60%
Size = 200%
XP = 27
Strategy = Run Towards
#Size of each animation frame
SheetFrameSize = 24,24
# Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
IdleAnimation = 3, 0.3, PingPong
JumpAnimation = 9, 0.2, Repeat
ShootAnimation = 3, 0.2, OneShot
DeathAnimation = 4, 0.15, OneShot
# Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity
DROP[0] = Frog Skin,35%,1,2
Hurt Sound = Monster Hurt
Death Sound = Slime Dead
Walk Sound = Slime Walk
#Additional custom animations go down below. Start with ANIMATION[0]. Order is:
# Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
ANIMATION[0] = 4, 0.2, OneShot
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB