Adapt to new CL changes.
|
@ -145,3 +145,19 @@ Material Texture "graphics/HUD/ShotgunRound_BoostEx.png"
|
|||
Texture "warptex" "textures/roughwarp.png"
|
||||
Define "BASE_RES" = "vec2(6.,3.)"
|
||||
}
|
||||
Material Texture "graphics/HUD/MarisaFace_Dread.png"
|
||||
{
|
||||
Shader "shaders/glsl/RoughWarp.fp"
|
||||
Texture "warptex" "textures/roughwarp.png"
|
||||
Define "BASE_RES" = "vec2(26.,28.)"
|
||||
Define "WRAP_X" = "4."
|
||||
Define "WRAP_Y" = "5."
|
||||
}
|
||||
Material Texture "graphics/HUD/MarisaFace_AngeryDread.png"
|
||||
{
|
||||
Shader "shaders/glsl/RoughWarp.fp"
|
||||
Texture "warptex" "textures/roughwarp.png"
|
||||
Define "BASE_RES" = "vec2(26.,28.)"
|
||||
Define "WRAP_X" = "4."
|
||||
Define "WRAP_Y" = "5."
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 133 B After Width: | Height: | Size: 146 B |
After Width: | Height: | Size: 741 B |
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 392 B |
After Width: | Height: | Size: 604 B |
|
@ -147,7 +147,7 @@ ASH_INTERTIP8 = "The Antares Beam Cannon can pierce through everything, up to a
|
|||
ASH_INTERTIP9 = "Unlike your other spells, Abyssal Embers can be cast even while underwater.";
|
||||
ASH_INTERTIP10 = "Greater Eruption not only ejects enemies far away, it also incinerates them good.";
|
||||
ASH_INTERTIP11 = "Red Sun is a rather costly spell, but its payoff is just as devastating.";
|
||||
ASH_INTERTIP12 = "Rings of Protection stack up to eight times, making you almost invincible.";
|
||||
ASH_INTERTIP12 = "Rings of Protection stack up to four times, making you almost invincible.";
|
||||
ASH_INTERTIP13 = "Hellion Cherries are nasty little things. They blow up real good.";
|
||||
ASH_INTERTIP14 = "The Dreadfire Solution temporarily transforms all your spells into powerful chaotic variants.";
|
||||
ASH_INTERTIP15 = "The Devastation Sigil will magnify all your damage. Careful not to hurt yourself.";
|
||||
|
|
|
@ -120,7 +120,7 @@ ASH_INTERTIP8 = "El Cañón de Rayos Antares puede penetrarlo todo, hasta una di
|
|||
ASH_INTERTIP9 = "A diferencia de tus otros conjuros, las Ascuas Abisales pueden invocarse bajo el agua.";
|
||||
ASH_INTERTIP10 = "La Erupción Mayor no solo lanza enemigos por los aires, también los abrasa pero bien.";
|
||||
ASH_INTERTIP11 = "El Sol Rojo es un conjuro bastante caro, pero compensa con lo devastador que es.";
|
||||
ASH_INTERTIP12 = "Los Anillos de Protección se acoplan hasta ocho veces, volviéndote casi invencible.";
|
||||
ASH_INTERTIP12 = "Los Anillos de Protección se acoplan hasta cuatro veces, volviéndote casi invencible.";
|
||||
ASH_INTERTIP13 = "Las Cerezas Gamberras son cosa fina. Revientan pero que muy bien.";
|
||||
ASH_INTERTIP14 = "La Solución de Fuego Calamitoso transforma temporalmente todos tus conjuros en potentes variantes caóticas.";
|
||||
ASH_INTERTIP15 = "La Marca de Devastación magnifica todo tu daño. Ten cuidado de no hacértelo a ti.";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
ASH_MODVER="\cjCHILD OF ASH\c- \cw0.1a r103 \cu(Mon 11 Dec 11:05:47 CET 2023)\c-";
|
||||
ASH_SHORTVER="\cw0.1a r103 \cu(2023-12-11 11:05:47)\c-";
|
||||
ASH_MODVER="\cjCHILD OF ASH\c- \cw0.1a r104 \cu(Wed 13 Dec 20:45:05 CET 2023)\c-";
|
||||
ASH_SHORTVER="\cw0.1a r104 \cu(2023-12-13 20:45:05)\c-";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Class MarisaStatusBar : SWWMStatusBar
|
||||
{
|
||||
TextureID StatusTex, AmmoTex, WeaponTex, BarTex[9], GenTex[3];
|
||||
TextureID StatusTex, AmmoTex, WeaponTex, BarTex[9], GenTex[3], FaceTex[6];
|
||||
int AmmoFlash[4]; // flash when new ammo is received
|
||||
int AmmoOldAmounts[4]; // to detect when to flash
|
||||
Class<SWWMAmmo> AmmoSlots[4]; // ammo type on each slot
|
||||
|
@ -37,6 +37,14 @@ Class MarisaStatusBar : SWWMStatusBar
|
|||
GenTex[0] = TexMan.CheckForTexture("graphics/HUD/GenericAmmoBoxL.png");
|
||||
GenTex[1] = TexMan.CheckForTexture("graphics/HUD/GenericAmmoBoxM.png");
|
||||
GenTex[2] = TexMan.CheckForTexture("graphics/HUD/GenericAmmoBoxR.png");
|
||||
FaceTex[0] = TexMan.CheckForTexture("graphics/HUD/MarisaFace.png");
|
||||
FaceTex[1] = TexMan.CheckForTexture("graphics/HUD/MarisaFace_Flash.png");
|
||||
FaceTex[2] = TexMan.CheckForTexture("graphics/HUD/MarisaFace_Barrier.png");
|
||||
FaceTex[3] = TexMan.CheckForTexture("graphics/HUD/MarisaFace_Angery.png");
|
||||
FaceTex[4] = TexMan.CheckForTexture("graphics/HUD/MarisaFace_Dread.png");
|
||||
FaceTex[5] = TexMan.CheckForTexture("graphics/HUD/MarisaFace_AngeryDread.png");
|
||||
mugw = 26;
|
||||
mugh = 28;
|
||||
tclabel = mhudfontcol[MCR_ICE];
|
||||
tcvalue = mhudfontcol[MCR_WHITE];
|
||||
tcextra = mhudfontcol[MCR_IBUKIHUD];
|
||||
|
@ -69,8 +77,6 @@ Class MarisaStatusBar : SWWMStatusBar
|
|||
AmmoFlash[i] = 0;
|
||||
AmmoOldAmounts[i] = int.min;
|
||||
}
|
||||
bAlwaysDrawInv = true;
|
||||
bAlwaysAboveInv = true;
|
||||
}
|
||||
override void GetMinimapColors()
|
||||
{
|
||||
|
|
|
@ -50,10 +50,63 @@ extend Class MarisaStatusBar
|
|||
LagMana[i] = LagMana[i-1];
|
||||
}
|
||||
|
||||
override int GetFaceTex( SWWMPlayer demo )
|
||||
{
|
||||
let facestate = demo.facestate;
|
||||
let paindir = demo.paindir;
|
||||
let facetimer = demo.facetimer;
|
||||
let blinktime = demo.blinktime;
|
||||
if ( CPlayer.Health <= 0 ) return 16;
|
||||
if ( isInvulnerable() && (facestate >= FS_LOPAIN) ) return 4;
|
||||
if ( facestate == FS_OUCH ) return (paindir==-1)?14:(paindir==1)?15:13;
|
||||
if ( facestate == FS_HIPAIN ) return (paindir==-1)?11:(paindir==1)?12:10;
|
||||
if ( facestate == FS_LOPAIN ) return (paindir==-1)?8:(paindir==1)?9:7;
|
||||
if ( facestate == FS_GRIN ) return 4;
|
||||
if ( facestate == FS_SAD ) return 5;
|
||||
if ( facestate == FS_BLUSH ) return 6;
|
||||
// TODO unblinking face variant
|
||||
if ( blinktime < 0 ) return 3;
|
||||
return demo.lookdir;
|
||||
}
|
||||
|
||||
override int DrawMugshot()
|
||||
{
|
||||
int xx = xmargin+(36-mugw)/2;
|
||||
int yy = ymargin+32;
|
||||
let demo = SWWMPlayer(CPlayer.mo);
|
||||
if ( !demo ) return 64;
|
||||
double paintime = clamp((demo.lastdamagetimer-(gametic+Fractic))/double(GameTicRate),0.,1.);
|
||||
rss = MSTime()*128;
|
||||
double noiz = min(demo.lastdamage*.5*paintime,3.);
|
||||
Vector2 shake = (RandomShiver(),RandomShiver())*noiz;
|
||||
int idx = GetFaceTex(demo);
|
||||
Screen.DrawTexture(FaceTex[0],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcWidth,mugw,DTA_SrcHeight,mugh,DTA_DestWidth,mugw,DTA_DestHeight,mugh,DTA_SrcX,mugw*(idx%4),DTA_SrcY,mugh*(idx/4));
|
||||
double mt = ManaInter.GetValue(fractic);
|
||||
if ( mt > 100 )
|
||||
{
|
||||
double alph = clamp((mt-100.)/100.,0.,1.);
|
||||
Screen.DrawTexture(FaceTex[4],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_SrcWidth,mugw,DTA_SrcHeight,mugh,DTA_DestWidth,mugw,DTA_DestHeight,mugh,DTA_SrcX,mugw*(idx%4),DTA_SrcY,mugh*(idx/4));
|
||||
}
|
||||
if ( CPlayer.mo.FindInventory("AngeryPower") )
|
||||
{
|
||||
Screen.DrawTexture(FaceTex[3],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcWidth,mugw,DTA_SrcHeight,mugh,DTA_DestWidth,mugw,DTA_DestHeight,mugh,DTA_SrcX,mugw*(idx%4),DTA_SrcY,mugh*(idx/4));
|
||||
if ( mt > 100 )
|
||||
{
|
||||
double alph = clamp((mt-100.)/100.,0.,1.);
|
||||
Screen.DrawTexture(FaceTex[5],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_SrcWidth,mugw,DTA_SrcHeight,mugh,DTA_DestWidth,mugw,DTA_DestHeight,mugh,DTA_SrcX,mugw*(idx%4),DTA_SrcY,mugh*(idx/4));
|
||||
}
|
||||
}
|
||||
Screen.DrawTexture(FaceTex[1],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Color,Color(255,255,0,0),DTA_Alpha,min(1.,noiz),DTA_SrcWidth,mugw,DTA_SrcHeight,mugh,DTA_DestWidth,mugw,DTA_DestHeight,mugh,DTA_SrcX,mugw*(idx%4),DTA_SrcY,mugh*(idx/4));
|
||||
if ( (CPlayer.Health > 0) && isInvulnerable() )
|
||||
Screen.DrawTexture(FaceTex[1],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.8+.1*sin(gametic+fractic),DTA_SrcWidth,mugw,DTA_SrcHeight,mugh,DTA_DestWidth,mugw,DTA_DestHeight,mugh,DTA_SrcX,mugw*(idx%4),DTA_SrcY,mugh*(idx/4));
|
||||
if ( CPlayer.mo.FindInventory("BarrierPower") ) Screen.DrawTexture(FaceTex[2],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.5,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
return 68;
|
||||
}
|
||||
|
||||
override int DrawStatus()
|
||||
{
|
||||
double xx = xmargin+28;
|
||||
double yy = ss.y-(ymargin+24);
|
||||
double xx = xmargin+36;
|
||||
double yy = ss.y-(ymargin+29);
|
||||
Screen.DrawTexture(StatusTex,false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
double ht = clamp(HealthInter.GetValue(fractic),0,999);
|
||||
String str = String.Format("%3d",round(ht));
|
||||
|
@ -99,7 +152,7 @@ extend Class MarisaStatusBar
|
|||
Screen.DrawTexture(BarTex[0],false,xx+3+tht,yy+3,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,100.-tht,DTA_ColorOverlay,0xFF000000);
|
||||
Screen.DrawTexture(BarTex[7],false,xx+2+tht,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,100.-tht);
|
||||
}
|
||||
yy += 14;
|
||||
yy += 12;
|
||||
Screen.DrawTexture(StatusTex,false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
double mt = clamp(ManaInter.GetValue(fractic),0,999);
|
||||
str = String.Format("%3d",round(mt));
|
||||
|
@ -129,6 +182,6 @@ extend Class MarisaStatusBar
|
|||
Screen.DrawTexture(BarTex[8],false,xx+3,yy+3,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,mw,DTA_WindowRightF,lmw,DTA_ColorOverlay,0xFF000000);
|
||||
Screen.DrawTexture(BarTex[8],false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,mw,DTA_WindowRightF,lmw);
|
||||
}
|
||||
return 22;
|
||||
return 63;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,11 +25,11 @@ extend Class MarisaStatusBar
|
|||
|
||||
override void DrawWeapons()
|
||||
{
|
||||
if ( CPlayer.ReadyWeapon is 'SWWMWeapon' ) SWWMWeapon(CPlayer.ReadyWeapon).DrawWeapon(FracTic,ss.x-(xmargin+58),ss.y-(ymargin+14),hs,ss);
|
||||
if ( CPlayer.ReadyWeapon is 'SWWMWeapon' ) SWWMWeapon(CPlayer.ReadyWeapon).DrawWeapon(FracTic,ss.x-(xmargin+56),ss.y-(ymargin+12),hs,ss);
|
||||
else if ( CPlayer.ReadyWeapon )
|
||||
{
|
||||
// generic display
|
||||
double xx = ss.x-(xmargin+60), yy = ss.y-(ymargin+24);
|
||||
double xx = ss.x-(xmargin+58), yy = ss.y-(ymargin+22);
|
||||
String str;
|
||||
int dlen, dcnt;
|
||||
if ( CPlayer.ReadyWeapon.Ammo2 && (CPlayer.ReadyWeapon.Ammo2 != CPlayer.ReadyWeapon.Ammo1) )
|
||||
|
@ -45,11 +45,11 @@ extend Class MarisaStatusBar
|
|||
}
|
||||
Screen.DrawTexture(GenTex[0],false,xx-2,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
dcnt = (dlen-1)-int(Log10(max(1,CPlayer.ReadyWeapon.Ammo2.Amount)));
|
||||
for ( int i=0; i<dlen; i++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo2.Amount<=0)?MCR_RED:MCR_BRASS],xx+i*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
|
||||
for ( int i=0; i<dcnt; i++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo2.Amount<=0)?MCR_RED:MCR_BRASS],xx+i*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo2.Amount<=0)?MCR_RED:MCR_BRASS],xx,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 10;
|
||||
}
|
||||
xx = ss.x-(xmargin+60);
|
||||
xx = ss.x-(xmargin+58);
|
||||
if ( CPlayer.ReadyWeapon.Ammo1 )
|
||||
{
|
||||
dlen = 1+int(Log10(max(1,CPlayer.ReadyWeapon.Ammo1.MaxAmount)));
|
||||
|
@ -62,7 +62,7 @@ extend Class MarisaStatusBar
|
|||
}
|
||||
Screen.DrawTexture(GenTex[0],false,xx-2,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
dcnt = (dlen-1)-int(Log10(max(1,CPlayer.ReadyWeapon.Ammo1.Amount)));
|
||||
for ( int i=0; i<dlen; i++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo1.Amount<=0)?MCR_RED:MCR_BRASS],xx+i*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
|
||||
for ( int i=0; i<dcnt; i++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo1.Amount<=0)?MCR_RED:MCR_BRASS],xx+i*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo1.Amount<=0)?MCR_RED:MCR_BRASS],xx,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ extend Class MarisaStatusBar
|
|||
Screen.DrawText(MiniHUDFont,ncolor,xx,yy,String.Format("%d",(i%10)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
xx = ss.x-(xmargin+54);
|
||||
yy = ss.y-(ymargin+42);
|
||||
yy = ss.y-(ymargin+40);
|
||||
Screen.DrawTexture(AmmoTex,false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
xx += 2;
|
||||
yy += 2;
|
||||
|
|
|
@ -5,7 +5,7 @@ Class MarisaMana : SWWMAmmo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Inventory.MaxAmount 100; // actually 200, but this prevents scripts from breaking it
|
||||
Inventory.MaxAmount 200;
|
||||
+INVENTORY.UNDROPPABLE;
|
||||
+INVENTORY.UNTOSSABLE;
|
||||
+INVENTORY.UNCLEARABLE;
|
||||
|
|
|
@ -11,16 +11,16 @@ Class MarisaStatScreen : SWWMStatScreen
|
|||
override void Start( wbstartstruct wbstartstruct )
|
||||
{
|
||||
Super.Start(wbstartstruct);
|
||||
lnamecolor = Font.CR_WHITE;
|
||||
lauthcolor = Font.CR_DARKGRAY;
|
||||
lsubcolor = Font.CR_RED;
|
||||
statbasecolor = Font.CR_ICE;
|
||||
statcolor0 = Font.CR_DARKGRAY;
|
||||
statcolor1 = Font.CR_WHITE;
|
||||
statcolor2 = Font.CR_DARKRED;
|
||||
tipcolor0 = Font.CR_ICE;
|
||||
tipcolor1 = Font.CR_WHITE;
|
||||
glarecolor = "Red";
|
||||
lnamecolor = Font.FindFontColor('MiniWhite');
|
||||
lauthcolor = Font.FindFontColor('MiniIbukiHUD');
|
||||
lsubcolor = Font.FindFontColor('MiniCrimson');
|
||||
statbasecolor = Font.FindFontColor('MiniIce');
|
||||
statcolor0 = Font.FindFontColor('MiniWhite');
|
||||
statcolor1 = Font.FindFontColor('MiniBrass');
|
||||
statcolor2 = Font.FindFontColor('MiniRed');
|
||||
tipcolor0 = Font.FindFontColor('MiniIce');
|
||||
tipcolor1 = Font.FindFontColor('MiniWhite');
|
||||
glarecolor = 0xFFFF0000;
|
||||
}
|
||||
|
||||
override void StartMusic()
|
||||
|
@ -31,7 +31,7 @@ Class MarisaStatScreen : SWWMStatScreen
|
|||
override String StatCnt( int a, int b )
|
||||
{
|
||||
if ( b <= 0 ) return "N/A";
|
||||
return String.Format("%s \cm/\c- %s \cm(\c-%3d%%\cm)",SWWMUtility.ThousandsNum(max(a,0)),SWWMUtility.ThousandsNum(b),GetPct(a,b));
|
||||
return String.Format("%s \c[MiniIbukiHUD]/\c- %s \c[MiniIbukiHUD](\c-%3d%%\c[MiniIbukiHUD])",SWWMUtility.ThousandsNum(max(a,0)),SWWMUtility.ThousandsNum(b),GetPct(a,b));
|
||||
}
|
||||
|
||||
override String TimeStr( int secs )
|
||||
|
@ -40,8 +40,8 @@ Class MarisaStatScreen : SWWMStatScreen
|
|||
int h = secs/3600;
|
||||
int m = (secs/60)%60;
|
||||
int s = secs%60;
|
||||
if ( h ) return String.Format("%d\cm:\c-%02d\cm:\c-%02d",h,m,s);
|
||||
if ( m ) return String.Format("%d\cm:\c-%02d",m,s);
|
||||
if ( h ) return String.Format("%d\c[MiniIbukiHUD]:\c-%02d\c[MiniIbukiHUD]:\c-%02d",h,m,s);
|
||||
if ( m ) return String.Format("%d\c[MiniIbukiHUD]:\c-%02d",m,s);
|
||||
return String.Format("%d",s);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,23 @@
|
|||
// Here comes a not-so-ordinary witch
|
||||
|
||||
Enum ESayaFaceState
|
||||
{
|
||||
FS_DEFAULT,
|
||||
FS_GRIN,
|
||||
FS_BLUSH,
|
||||
FS_SAD,
|
||||
FS_LOPAIN,
|
||||
FS_HIPAIN,
|
||||
FS_OUCH,
|
||||
FS_DEAD // UNUSED
|
||||
};
|
||||
|
||||
Class MarisaPlayer : SWWMPlayer
|
||||
{
|
||||
int SpellSel;
|
||||
|
||||
transient bool faceblush;
|
||||
|
||||
Default
|
||||
{
|
||||
Tag "$T_MARISA";
|
||||
|
@ -35,6 +49,90 @@ Class MarisaPlayer : SWWMPlayer
|
|||
+SWWMPLAYER.CANDODGE;
|
||||
}
|
||||
|
||||
// stuck in here for now, to do the mugshot
|
||||
override void UpdateFace()
|
||||
{
|
||||
// damage handling
|
||||
if ( facedamage )
|
||||
{
|
||||
if ( lastdamage > 50 )
|
||||
{
|
||||
facestate = FS_OUCH;
|
||||
facetimer = (lastdamagetimer-gametic)+10;
|
||||
}
|
||||
else if ( facestate < FS_OUCH )
|
||||
{
|
||||
facestate = (lastdamage>15)?FS_HIPAIN:FS_LOPAIN;
|
||||
facetimer = (lastdamagetimer-gametic)+10;
|
||||
}
|
||||
paindir = 0;
|
||||
// paraphrased from vanilla, with some tweaks
|
||||
if ( player.attacker && (player.attacker != self) )
|
||||
{
|
||||
double atkang = AngleTo(player.attacker);
|
||||
double angdiff = deltaangle(angle,atkang);
|
||||
if ( abs(angdiff) < 135 )
|
||||
{
|
||||
if ( angdiff > 45 ) paindir = -1;
|
||||
else if ( angdiff < -45 ) paindir = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
facedamage = false;
|
||||
if ( facegrin && (facestate < FS_SAD) )
|
||||
{
|
||||
facestate = FS_GRIN;
|
||||
facetimer = 50;
|
||||
}
|
||||
facegrin = false;
|
||||
if ( faceblush && (facestate < FS_LOPAIN) )
|
||||
{
|
||||
facestate = FS_BLUSH;
|
||||
facetimer = 30;
|
||||
}
|
||||
faceblush = false;
|
||||
if ( facesad && (facestate <= FS_SAD) )
|
||||
{
|
||||
facestate = FS_SAD;
|
||||
facetimer = 50;
|
||||
}
|
||||
facesad = false;
|
||||
if ( facetimer > 0 )
|
||||
{
|
||||
facetimer--;
|
||||
if ( facetimer <= 0 )
|
||||
{
|
||||
facestate = FS_DEFAULT;
|
||||
blinktime = 30;
|
||||
}
|
||||
}
|
||||
if ( !(gametic&1) )
|
||||
{
|
||||
if ( blinktime <= 0 )
|
||||
{
|
||||
blinktime--;
|
||||
if ( blinktime < -2 )
|
||||
{
|
||||
rss = MSTime();
|
||||
blinktime = (abs(GetRandom())%10)?(40+abs(GetRandom())%40):6;
|
||||
looktime = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
blinktime--;
|
||||
looktime++;
|
||||
if ( looktime >= 8 )
|
||||
{
|
||||
looktime = 0;
|
||||
rss = MSTime();
|
||||
lookdir = abs(GetRandom())%3;
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO: update the actual texture on the model
|
||||
}
|
||||
|
||||
override Weapon PickWeapon( int slot, bool checkammo )
|
||||
{
|
||||
if ( (slot >= 8) && (slot <= 9) ) EventHandler.SendNetworkEvent("marisaspellslot",slot-8);
|
||||
|
|