From dfd549de2f35f6f191140bdda9c401a72ff2bce0 Mon Sep 17 00:00:00 2001 From: parameterized Date: Thu, 28 Feb 2019 00:03:29 -0500 Subject: [PATCH] +dragon armor --- entityDefs/player.lua | 108 ++++++++++++++---- gfx/items/{chest.png => armor0_chest.png} | Bin gfx/items/{helmet.png => armor0_helmet.png} | Bin gfx/items/{pants.png => armor0_pants.png} | Bin gfx/items/armor1_chest.png | Bin 0 -> 300 bytes gfx/items/armor1_helmet.png | Bin 0 -> 237 bytes gfx/items/armor1_pants.png | Bin 0 -> 201 bytes gfx/player/armor/armor1/chest/swing.png | Bin 0 -> 670 bytes gfx/player/armor/armor1/chest/walk.png | Bin 0 -> 521 bytes .../armor/armor1/chest/walk_and_swing.png | Bin 0 -> 717 bytes gfx/player/armor/armor1/helmet/swing.png | Bin 0 -> 349 bytes gfx/player/armor/armor1/helmet/walk.png | Bin 0 -> 317 bytes .../armor/armor1/helmet/walk_and_swing.png | Bin 0 -> 387 bytes gfx/player/armor/armor1/pants/swing.png | Bin 0 -> 312 bytes gfx/player/armor/armor1/pants/walk.png | Bin 0 -> 372 bytes .../armor/armor1/pants/walk_and_swing.png | Bin 0 -> 408 bytes items.lua | 14 ++- loadassets.lua | 43 ++++++- tempCommon.lua | 4 +- 19 files changed, 139 insertions(+), 30 deletions(-) rename gfx/items/{chest.png => armor0_chest.png} (100%) rename gfx/items/{helmet.png => armor0_helmet.png} (100%) rename gfx/items/{pants.png => armor0_pants.png} (100%) create mode 100644 gfx/items/armor1_chest.png create mode 100644 gfx/items/armor1_helmet.png create mode 100644 gfx/items/armor1_pants.png create mode 100644 gfx/player/armor/armor1/chest/swing.png create mode 100644 gfx/player/armor/armor1/chest/walk.png create mode 100644 gfx/player/armor/armor1/chest/walk_and_swing.png create mode 100644 gfx/player/armor/armor1/helmet/swing.png create mode 100644 gfx/player/armor/armor1/helmet/walk.png create mode 100644 gfx/player/armor/armor1/helmet/walk_and_swing.png create mode 100644 gfx/player/armor/armor1/pants/swing.png create mode 100644 gfx/player/armor/armor1/pants/walk.png create mode 100644 gfx/player/armor/armor1/pants/walk_and_swing.png diff --git a/entityDefs/player.lua b/entityDefs/player.lua index 4838842..24baf0c 100644 --- a/entityDefs/player.lua +++ b/entityDefs/player.lua @@ -342,18 +342,33 @@ function player.client:draw() lume.round(px), lume.round(py), 23) -- pants if pantsItem then - self:drawFrame(anims.player.armor.armor0.pants.swing, swingFrameIdx, - lume.round(px), lume.round(py), 23) + if pantsItem.imageId == 'armor0Pants' then + self:drawFrame(anims.player.armor.armor0.pants.swing, swingFrameIdx, + lume.round(px), lume.round(py), 23) + elseif pantsItem.imageId == 'armor1Pants' then + self:drawFrame(anims.player.armor.armor1.pants.swing, swingFrameIdx, + lume.round(px), lume.round(py), 23) + end end -- chest if chestItem then - self:drawFrame(anims.player.armor.armor0.chest.swing, swingFrameIdx, - lume.round(px), lume.round(py), 23) + if chestItem.imageId == 'armor0Chest' then + self:drawFrame(anims.player.armor.armor0.chest.swing, swingFrameIdx, + lume.round(px), lume.round(py), 23) + elseif chestItem.imageId == 'armor1Chest' then + self:drawFrame(anims.player.armor.armor1.chest.swing, swingFrameIdx, + lume.round(px), lume.round(py), 23) + end end -- helmet if helmetItem then - self:drawFrame(anims.player.armor.armor0.helmet.swing, swingFrameIdx, - lume.round(px), lume.round(py), 23) + if helmetItem.imageId == 'armor0Helmet' then + self:drawFrame(anims.player.armor.armor0.helmet.swing, swingFrameIdx, + lume.round(px), lume.round(py), 23) + elseif helmetItem.imageId == 'armor1Helmet' then + self:drawFrame(anims.player.armor.armor1.helmet.swing, swingFrameIdx, + lume.round(px), lume.round(py), 23) + end end -- sword if attackItem and isSword[attackItem.imageId] then @@ -371,8 +386,13 @@ function player.client:draw() lume.round(px), lume.round(py), 23) -- pants if pantsItem then - self:drawFrame(anims.player.armor.armor0.pants.walkAndSwing, walkFrameIdx, - lume.round(px), lume.round(py), 23) + if pantsItem.imageId == 'armor0Pants' then + self:drawFrame(anims.player.armor.armor0.pants.walkAndSwing, walkFrameIdx, + lume.round(px), lume.round(py), 23) + elseif pantsItem.imageId == 'armor1Pants' then + self:drawFrame(anims.player.armor.armor1.pants.walkAndSwing, walkFrameIdx, + lume.round(px), lume.round(py), 23) + end end -- upper body love.graphics.push() @@ -382,13 +402,23 @@ function player.client:draw() lume.round(px), lume.round(py), 23) -- chest if chestItem then - self:drawFrame(anims.player.armor.armor0.chest.walkAndSwing, swingFrameIdx, - lume.round(px), lume.round(py), 23) + if chestItem.imageId == 'armor0Chest' then + self:drawFrame(anims.player.armor.armor0.chest.walkAndSwing, swingFrameIdx, + lume.round(px), lume.round(py), 23) + elseif chestItem.imageId == 'armor1Chest' then + self:drawFrame(anims.player.armor.armor1.chest.walkAndSwing, swingFrameIdx, + lume.round(px), lume.round(py), 23) + end end -- helmet if helmetItem then - self:drawFrame(anims.player.armor.armor0.helmet.walkAndSwing, swingFrameIdx, - lume.round(px), lume.round(py), 23) + if helmetItem.imageId == 'armor0Helmet' then + self:drawFrame(anims.player.armor.armor0.helmet.walkAndSwing, swingFrameIdx, + lume.round(px), lume.round(py), 23) + elseif helmetItem.imageId == 'armor1Helmet' then + self:drawFrame(anims.player.armor.armor1.helmet.walkAndSwing, swingFrameIdx, + lume.round(px), lume.round(py), 23) + end end love.graphics.pop() -- sword @@ -405,18 +435,33 @@ function player.client:draw() lume.round(px), lume.round(py), 23) -- pants if pantsItem then - self:drawFrame(anims.player.armor.armor0.pants.swing, 1, - lume.round(px), lume.round(py), 23) + if pantsItem.imageId == 'armor0Pants' then + self:drawFrame(anims.player.armor.armor0.pants.swing, 1, + lume.round(px), lume.round(py), 23) + elseif pantsItem.imageId == 'armor1Pants' then + self:drawFrame(anims.player.armor.armor1.pants.swing, 1, + lume.round(px), lume.round(py), 23) + end end -- chest if chestItem then - self:drawFrame(anims.player.armor.armor0.chest.swing, 1, - lume.round(px), lume.round(py), 23) + if chestItem.imageId == 'armor0Chest' then + self:drawFrame(anims.player.armor.armor0.chest.swing, 1, + lume.round(px), lume.round(py), 23) + elseif chestItem.imageId == 'armor1Chest' then + self:drawFrame(anims.player.armor.armor1.chest.swing, 1, + lume.round(px), lume.round(py), 23) + end end -- helmet if helmetItem then - self:drawFrame(anims.player.armor.armor0.helmet.swing, 1, - lume.round(px), lume.round(py), 23) + if helmetItem.imageId == 'armor0Helmet' then + self:drawFrame(anims.player.armor.armor0.helmet.swing, 1, + lume.round(px), lume.round(py), 23) + elseif helmetItem.imageId == 'armor1Helmet' then + self:drawFrame(anims.player.armor.armor1.helmet.swing, 1, + lume.round(px), lume.round(py), 23) + end end -- sword if attackItem and isSword[attackItem.imageId] then @@ -430,18 +475,33 @@ function player.client:draw() lume.round(px), lume.round(py), 8) -- pants if pantsItem then - self:drawFrame(anims.player.armor.armor0.pants.walk, walkFrameIdx, - lume.round(px), lume.round(py), 8) + if pantsItem.imageId == 'armor0Pants' then + self:drawFrame(anims.player.armor.armor0.pants.walk, walkFrameIdx, + lume.round(px), lume.round(py), 8) + elseif pantsItem.imageId == 'armor1Pants' then + self:drawFrame(anims.player.armor.armor1.pants.walk, walkFrameIdx, + lume.round(px), lume.round(py), 8) + end end -- chest if chestItem then - self:drawFrame(anims.player.armor.armor0.chest.walk, walkFrameIdx, - lume.round(px), lume.round(py), 8) + if chestItem.imageId == 'armor0Chest' then + self:drawFrame(anims.player.armor.armor0.chest.walk, walkFrameIdx, + lume.round(px), lume.round(py), 8) + elseif chestItem.imageId == 'armor1Chest' then + self:drawFrame(anims.player.armor.armor1.chest.walk, walkFrameIdx, + lume.round(px), lume.round(py), 8) + end end -- helmet if helmetItem then - self:drawFrame(anims.player.armor.armor0.helmet.walk, walkFrameIdx, - lume.round(px), lume.round(py), 8) + if helmetItem.imageId == 'armor0Helmet' then + self:drawFrame(anims.player.armor.armor0.helmet.walk, walkFrameIdx, + lume.round(px), lume.round(py), 8) + elseif helmetItem.imageId == 'armor1Helmet' then + self:drawFrame(anims.player.armor.armor1.helmet.walk, walkFrameIdx, + lume.round(px), lume.round(py), 8) + end end -- sword if attackItem and isSword[attackItem.imageId] then diff --git a/gfx/items/chest.png b/gfx/items/armor0_chest.png similarity index 100% rename from gfx/items/chest.png rename to gfx/items/armor0_chest.png diff --git a/gfx/items/helmet.png b/gfx/items/armor0_helmet.png similarity index 100% rename from gfx/items/helmet.png rename to gfx/items/armor0_helmet.png diff --git a/gfx/items/pants.png b/gfx/items/armor0_pants.png similarity index 100% rename from gfx/items/pants.png rename to gfx/items/armor0_pants.png diff --git a/gfx/items/armor1_chest.png b/gfx/items/armor1_chest.png new file mode 100644 index 0000000000000000000000000000000000000000..10ff53308ed5dbe8672f8d47c8b39f5fa31b47dd GIT binary patch literal 300 zcmeAS@N?(olHy`uVBq!ia0vp^{20#LT=By}Z;C1rt3( zJ<}BT2#_^%JzX3_Ed19_ILO;f70^zlQK^I zG2y!q`YiJP<`ah)6i)b+@WmJ&RAAPodvmC>Aq1^9aoi^f{NYjcMw7 qtD>8oPds>@?h?p&IMMo44s)MRQg_zYOrWnA7(8A5T-G@yGywo9`)?os literal 0 HcmV?d00001 diff --git a/gfx/items/armor1_helmet.png b/gfx/items/armor1_helmet.png new file mode 100644 index 0000000000000000000000000000000000000000..74dd826465ef1574486265bd16afcb965474c83a GIT binary patch literal 237 zcmeAS@N?(olHy`uVBq!ia0vp^{20#LT=By}Z;C1rt3( zJ<}BT2#_^#o-U3d7XHZ$jiFha{wGT4G%zQGvOkKs9NOsp;IKhyz*+%@$qFroCQSz( zTv+p~UcHMg#V$AZSo_NLk}MN=88#-)Sl}k%5Z2SfnbpEr!rXCzopr07M~1y8r+H literal 0 HcmV?d00001 diff --git a/gfx/items/armor1_pants.png b/gfx/items/armor1_pants.png new file mode 100644 index 0000000000000000000000000000000000000000..40bdbee6d6a3e304a7368da8a1180b19f62866ea GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^{20#LT=By}Z;C1rt3( zJ<}BT2#_^ao-U3d7XHZ#v}UYT`71Bprgf0dfh%m~$wx;jcqL?JIp#>Hc^m5)u1N?n nwl!^L@L=4fl#?XF#Ky+J>v-^Xrjk<$&=dwwS3j3^P64}06bJDC#?4wDSZ*g+g_Xcn7FXXD_Z6F*HWnn83xgrp_!cw?W&tj40^rj8~v07&lG_JekxXs&mNes=a^b|Z_esR8IMaw?et;OXC9W!|P{ey#Nm*&EI; z+TK@5Xy6!pcv+}ju_bqmnStj!xaPdJwm#9C-*;B0d&0JZjp=NO>1>HF`RmnN6T6tP zWENXfV>(;n?tX=>siQbxvg7&lxJ|`@T9Gm^&^oRj7ha;zs zoBaW+-3~zez^%t4Bj5849PtI&3l6fL^E!JQ!p;7GvN+yorBSqF=5U(1?Lm}>{r?LO zhln3x*R|^Roz~g=oe(%)K-KT7KQLhCaN2S=$uM?3fWY%YA&Z5}Iy)J{wlK|=4ghW* z9##M5jhVwMiyUQz3jhEB07*qoM6N<$ Ef{E%r?f?J) literal 0 HcmV?d00001 diff --git a/gfx/player/armor/armor1/chest/walk.png b/gfx/player/armor/armor1/chest/walk.png new file mode 100644 index 0000000000000000000000000000000000000000..f28b6bf39563eca9f2d8cfcbacd615b7dc3ca953 GIT binary patch literal 521 zcmV+k0`~ohP)YcKU@R z#%huq6|Upi7ngeqY=0GqrdYy!yU>Bw#_Td z+s*IGXTJ#*FoK>+`KpTj7tUsz<4slcrwF7 zwUS(wE7k_DkUWWlUMF?=wOs1W;!XW?VmjC+ubf=jH`wiBP7|E#%|bYEWd+;jP12}U zvDqKOk12}wo_&uiE7%sVTo{}E0gYNUb_^2~?L8T|dAq6S?WQ&zY>PK~8;cH}eD@dY z!mlv%c2n1#3Y6<&v{>ir4F@iH-&L-QVXz8=mFuQHTrXjpH|bWc8@nL#I@6kkVX(qz zu|^lT+8vv5Er01G<#I&;z?;9!B)8QoZgI$LmRZpSbP;dMUpm2Vhpj&1{rM3e%FFCI zJME{+)6wAmV(m!m*FXDR!ZvT3qpaS%EFuZ%$`F6JyN~+LKreUF zi_jd}P!^(3mf4t{!{H+IrC^^IqAwkXz-8A?79od&o}*`EnT^%W`*)(}#q~T}e}`xW z{#(`f^y`o4ca>!}R%tW<0PIxlO=bYlxqW#bG`j{K`Ud3ANf+~M?Uyyn1^g&DgvN{cE!Nz>C!hEs9S^V_wEs0sCFPXKSsxe=z@a@MMJ5_skzyttaK3)KjzpZvL z8%_>pnnhk;owxqEWIkl}z2|jNJlc7r(P01OkEAbvT=#5k5$eKpuys)YI0W_qGj~TH zc;scZzlOG<-b^P-e`45i#8xhPcJ|rYXc!|et4BXe$IRWy%W9u}G>lspqWL7eb#Q+1 z5<68RjRr`g0oFxfwP$DlV$G7xL6M4?yJKd}%L-YNJo!74w$*uAAx$3M1G6OA-!yD+ z_QgzF$x`i;D~qr#jJ`7ihb@xyqM5lH%WSO7 zC->!gE9QxJjM=k!m}H}8tJ_g?`_SAXUH;xik_Q7|=B~6Yy1w7}p404EZ%xIJbb3Y9 z6=^58qPIUpL_|bHL_|bHL_|bHL_|bHL?p$3aktOK_oZ^V00000NkvXXu0mjf9gkNx literal 0 HcmV?d00001 diff --git a/gfx/player/armor/armor1/helmet/swing.png b/gfx/player/armor/armor1/helmet/swing.png new file mode 100644 index 0000000000000000000000000000000000000000..51d6ef664bf9767bbf61634ff1b00c532597742d GIT binary patch literal 349 zcmeAS@N?(olHy`uVBq!ia0vp^4}n;PgAGX5Pm8T(U|>}7ba4!+nDh3!qt{^viMEF; zIV@YP3l+cWyxTK#`Ui`sm=0_IiJ`F`rwt;abB>>DKfjq%Q*qBLW@f3<-7yIj??yVGAk)y%sT zb+$OtFZfE<+-ou4@9o>8Z?<25`O7(x?B27=-(S;GxvXv$r8maTeH`z|P^rSUX-v4CCXRG%+Vype$TvaQQy&-4X zee~Ma+~0Nc#rfTRgRS46);=aKS+(?UbolLSXI}s9m)^7>Eaz^(+wxh>X7BF)*kAJd zU4y3C`tQ@;aP!oL9JyAz)vx1tYW(lVtjDD+zU66bJj)IAKO87*;4Xi4bHRg83Tr@O Mp00i_>zopr022z2aR2}S literal 0 HcmV?d00001 diff --git a/gfx/player/armor/armor1/helmet/walk_and_swing.png b/gfx/player/armor/armor1/helmet/walk_and_swing.png new file mode 100644 index 0000000000000000000000000000000000000000..ff2f8e177660bdb9dc73af493d316b745110f317 GIT binary patch literal 387 zcmeAS@N?(olHy`uVBq!ia0vp^4}n;PgAGX5Pm8T(U|{s}ba4!+nDh3!t>0k>fukSO zXU%Ckx5#0}>I+YW=CpfXC=_+jQ`$90X{zQT*Y2nMoY@I+KmMzn?o3t9ciSB4&IB|G z2tL$*iM77+et!PC_MO%GcSDb~TbbR^{cN#*@ydDWZ>qoKwCFgUTz=4W`*2e3%ZpM(ETt8@FRVQ{DgK#Neywfxy^Vh#-k2h#^77%=m#^pKPVb-B zJHhqEl?R7FCYH!eT2s0F4gc|Fd+K)9|0z4CQe`&lYjjyxGm${!k^yP71!kVs(#fi%AQr6k@woFrS!wg znwLAjW|=&{aOYYs$Lre*{=JWpe*3}n`Gq}eZVOyUXa7ek?xA v0aW~Fcb;(EBBg2hef!s)2D&MYVZmEwR!8UOIxbDBAisFJ`njxgN@xNA6s(ZU literal 0 HcmV?d00001 diff --git a/gfx/player/armor/armor1/pants/walk.png b/gfx/player/armor/armor1/pants/walk.png new file mode 100644 index 0000000000000000000000000000000000000000..c553e2db5a476208bedc0f5f6a4c9bc61756c96e GIT binary patch literal 372 zcmeAS@N?(olHy`uVBq!ia0vp^c|fel!3HEPLgzU#Ffdwsx;TbpG`_uN*w<_zzXsNvmq+)xl`1`0S}_wEJL zxkq1j=)T+~z3lMuwP$TB?yct*ytp*?TD27GeADpRTkbvE-fj~z*)`ApoLX$cRBsjO zcKiEJRyX8}Z~awRX6KT5W}(S3$5k1p_9y!5AKdM{`I-0a0COL|V!_X>bBeyF-9ZQsF{HOrxHeOQ!$>HB@Mem~?lx=#P-`MT|7?cr&~A}<#{PktF) z7PZUn^tIWO_bvTqZBjOO>*FOyr);oU_;-2ToY>ssPsBFx7lvP6v)`wAmiCEuk4cvw zTwCI4ygediS&W}irOR#JN6tF;oVu+W*t1H{MH*GEb4$}Zy{e31!Y{^X!A);7%YSVL O1%s!npUXO@geCwON2Iv` literal 0 HcmV?d00001 diff --git a/gfx/player/armor/armor1/pants/walk_and_swing.png b/gfx/player/armor/armor1/pants/walk_and_swing.png new file mode 100644 index 0000000000000000000000000000000000000000..755cf1714742adce16ddfa10503b58e6e5f5f418 GIT binary patch literal 408 zcmeAS@N?(olHy`uVBq!ia0vp^4}n;PgAGX5Pm8T(U|@{*ba4!+nDh3AVPCU>K((=WEoR>?5Hs$6 zakZ`L=+nE8$}IJ7-T&TIH)k&Y$Ge7nE5F^ku*LiK^NJzk4%D)$@i z8tk0a&G`Ft_UJ<*?7ms&h-~>R!sd{;h>G45ucU*wO^Iq?SHX<^W`~a=Wk_Q zusf2(y!^&DKi555C)l~H{Q9ggm-*V9^4_g`ls;+auayo=son8Ipj#%m{Pn-e2=3ta oJ->pU-TIvObjyxs3=CJEvj>T86caW5Fbxz?p00i_>zopr01Gm?`~Uy| literal 0 HcmV?d00001 diff --git a/items.lua b/items.lua index af99c62..d04b7da 100644 --- a/items.lua +++ b/items.lua @@ -11,11 +11,21 @@ items = { function items.server.newItem(data) data.id = lume.uuid() + + data.type = data.imageId if isSword[data.imageId] then data.type = 'sword' - else - data.type = data.imageId end + if data.imageId == 'armor0Helmet' or data.imageId == 'armor1Helmet' then + data.type = 'helmet' + end + if data.imageId == 'armor0Chest' or data.imageId == 'armor1Chest' then + data.type = 'chest' + end + if data.imageId == 'armor0Pants' or data.imageId == 'armor1Pants' then + data.type = 'pants' + end + items.server.container[data.id] = data return data.id end diff --git a/loadassets.lua b/loadassets.lua index 4ce0abb..325cb03 100644 --- a/loadassets.lua +++ b/loadassets.lua @@ -88,6 +88,23 @@ gfx = { swing = love.graphics.newImage('gfx/player/armor/armor0/pants/swing.png'), walkAndSwing = love.graphics.newImage('gfx/player/armor/armor0/pants/walk_and_swing.png') } + }, + armor1 = { + chest = { + walk = love.graphics.newImage('gfx/player/armor/armor1/chest/walk.png'), + swing = love.graphics.newImage('gfx/player/armor/armor1/chest/swing.png'), + walkAndSwing = love.graphics.newImage('gfx/player/armor/armor1/chest/walk_and_swing.png') + }, + helmet = { + walk = love.graphics.newImage('gfx/player/armor/armor1/helmet/walk.png'), + swing = love.graphics.newImage('gfx/player/armor/armor1/helmet/swing.png'), + walkAndSwing = love.graphics.newImage('gfx/player/armor/armor1/helmet/walk_and_swing.png') + }, + pants = { + walk = love.graphics.newImage('gfx/player/armor/armor1/pants/walk.png'), + swing = love.graphics.newImage('gfx/player/armor/armor1/pants/swing.png'), + walkAndSwing = love.graphics.newImage('gfx/player/armor/armor1/pants/walk_and_swing.png') + } } }, swords = { @@ -143,9 +160,12 @@ gfx = { sword4 = love.graphics.newImage('gfx/items/sword4.png'), shield = love.graphics.newImage('gfx/items/shield.png'), apple = love.graphics.newImage('gfx/items/apple.png'), - helmet = love.graphics.newImage('gfx/items/helmet.png'), - chest = love.graphics.newImage('gfx/items/chest.png'), - pants = love.graphics.newImage('gfx/items/pants.png') + armor0Helmet = love.graphics.newImage('gfx/items/armor0_helmet.png'), + armor0Chest = love.graphics.newImage('gfx/items/armor0_chest.png'), + armor0Pants = love.graphics.newImage('gfx/items/armor0_pants.png'), + armor1Helmet = love.graphics.newImage('gfx/items/armor1_helmet.png'), + armor1Chest = love.graphics.newImage('gfx/items/armor1_chest.png'), + armor1Pants = love.graphics.newImage('gfx/items/armor1_pants.png') }, slimeBall = love.graphics.newImage('gfx/slime_ball.png') } @@ -196,6 +216,23 @@ anims.player = { swing = newAnim(gfx.player.armor.armor0.pants.swing, 43, 34, 1, 5), walkAndSwing = newAnim(gfx.player.armor.armor0.pants.walkAndSwing, 43, 34, 1, 5) } + }, + armor1 = { + chest = { + walk = newAnim(gfx.player.armor.armor1.chest.walk, 20, 31, 1, 5), + swing = newAnim(gfx.player.armor.armor1.chest.swing, 43, 34, 1, 5), + walkAndSwing = newAnim(gfx.player.armor.armor1.chest.walkAndSwing, 43, 34, 1, 5) + }, + helmet = { + walk = newAnim(gfx.player.armor.armor1.helmet.walk, 20, 31, 1, 5), + swing = newAnim(gfx.player.armor.armor1.helmet.swing, 43, 34, 1, 5), + walkAndSwing = newAnim(gfx.player.armor.armor1.helmet.walkAndSwing, 43, 34, 1, 5) + }, + pants = { + walk = newAnim(gfx.player.armor.armor1.pants.walk, 20, 31, 1, 5), + swing = newAnim(gfx.player.armor.armor1.pants.swing, 43, 34, 1, 5), + walkAndSwing = newAnim(gfx.player.armor.armor1.pants.walkAndSwing, 43, 34, 1, 5) + } } }, swords = { diff --git a/tempCommon.lua b/tempCommon.lua index 3e12f1a..bd2aba2 100644 --- a/tempCommon.lua +++ b/tempCommon.lua @@ -25,7 +25,9 @@ function serverEnemyDamage(self, d, clientId) server.addXP(clientId, math.random(3, 5)) local bagItems = {} local choices = { - none=20, apple=10, helmet=16, chest=16, pants=16, shield=5, + none=20, apple=10, shield=5, + armor0Helmet=8, armor0Chest=8, armor0Pants=8, + armor1Helmet=8, armor1Chest=8, armor1Pants=8, sword0=4, sword1=4, sword2=3, sword3=3, sword4=3 } for _=1, 3 do