@@ -89,7 +89,7 @@ type StartResponse = {
8989} ;
9090
9191const TOTAL_PITCHES = 10 ;
92- const APP_VERSION = 'v1.1.2 ' ;
92+ const APP_VERSION = 'v1.1.3 ' ;
9393const BATTER_FRAMES = [
9494 'ready' ,
9595 'load' ,
@@ -103,9 +103,32 @@ const BATTER_FRAMES = [
103103const DAILY_BAT_STORAGE_KEY = 'utang-baseball-daily-bat-v1' ;
104104const BAT_SPRITES : Record < BatType , string > = {
105105 basic : '/utang-batter-v8-strip.png' ,
106+ aluminum : '/utang-batter-v8-aluminum-strip.png' ,
106107 gold : '/utang-batter-v8-gold-strip.png' ,
108+ ruby : '/utang-batter-v8-ruby-strip.png' ,
107109 diamond : '/utang-batter-v8-diamond-strip.png' ,
108110} ;
111+ const BAT_LABELS : Record < BatType , string > = {
112+ basic : '기본' ,
113+ aluminum : '알루미늄' ,
114+ gold : '황금' ,
115+ ruby : '루비' ,
116+ diamond : '다이아몬드' ,
117+ } ;
118+ const BAT_ICONS : Record < BatType , string > = {
119+ basic : '/utang-bat-gold-v093.png' ,
120+ aluminum : '/utang-bat-aluminum-v113.png' ,
121+ gold : '/utang-bat-gold-v093.png' ,
122+ ruby : '/utang-bat-ruby-v113.png' ,
123+ diamond : '/utang-bat-diamond-v093.png' ,
124+ } ;
125+ const BAT_COLLECTION : Array < { type : BatType ; games : number } > = [
126+ { type : 'basic' , games : 0 } ,
127+ { type : 'aluminum' , games : 1 } ,
128+ { type : 'gold' , games : 2 } ,
129+ { type : 'ruby' , games : 3 } ,
130+ { type : 'diamond' , games : 4 } ,
131+ ] ;
109132const RANKING_PAGE_SIZE = 5 ;
110133const WINDUP_MS = 760 ;
111134const CONTACT_PROGRESS = 0.86 ;
@@ -262,18 +285,10 @@ function saveDailyBatState(state: DailyBatState) {
262285 }
263286}
264287function missPoseForBat ( bat : BatType ) {
265- return bat === 'gold'
266- ? '/utang-pose-miss-v093-gold.png'
267- : bat === 'diamond'
268- ? '/utang-pose-miss-v093-diamond.png'
269- : RESULT_META . WHIFF . pose ;
288+ return bat === 'basic' ? RESULT_META . WHIFF . pose : `/utang-pose-miss-v093-${ bat } .png` ;
270289}
271290function followPoseForBat ( bat : BatType ) {
272- return bat === 'gold'
273- ? '/utang-batter-v8-gold-follow.png'
274- : bat === 'diamond'
275- ? '/utang-batter-v8-diamond-follow.png'
276- : RESULT_META . HOME_RUN . pose ;
291+ return bat === 'basic' ? RESULT_META . HOME_RUN . pose : `/utang-batter-v8-${ bat } -follow.png` ;
277292}
278293function triggerHitHaptic ( outcome : Outcome ) {
279294 if (
@@ -534,11 +549,17 @@ export default function Home() {
534549 useEffect ( ( ) => {
535550 const characterAssets = [
536551 '/utang-batter-v8-strip.png' ,
552+ '/utang-batter-v8-aluminum-strip.png' ,
537553 '/utang-batter-v8-gold-strip.png' ,
554+ '/utang-batter-v8-ruby-strip.png' ,
538555 '/utang-batter-v8-diamond-strip.png' ,
556+ '/utang-bat-aluminum-v113.png' ,
539557 '/utang-bat-gold-v093.png' ,
558+ '/utang-bat-ruby-v113.png' ,
540559 '/utang-bat-diamond-v093.png' ,
560+ '/utang-pose-miss-v093-aluminum.png' ,
541561 '/utang-pose-miss-v093-gold.png' ,
562+ '/utang-pose-miss-v093-ruby.png' ,
542563 '/utang-pose-miss-v093-diamond.png' ,
543564 '/utang-pitcher-v090-strip.png' ,
544565 '/utang-umpire-v091-strip.png' ,
@@ -1273,37 +1294,22 @@ export default function Home() {
12731294 < section className = "bat-collection" aria-label = "오늘 모은 배트" >
12741295 < div className = "bat-collection-head" >
12751296 < strong > 오늘 모은 배트</ strong >
1276- < span > { Math . min ( 3 , dailyBatState . completedGames + 1 ) } / 3 </ span >
1297+ < span > { Math . min ( 5 , dailyBatState . completedGames + 1 ) } / 5 </ span >
12771298 </ div >
12781299 < div className = "bat-collection-list" >
1279- < div className = "bat-slot is-owned" >
1280- < img
1281- className = "bat-thumb bat-thumb-basic"
1282- src = "/utang-bat-gold-v093.png"
1283- alt = ""
1284- />
1285- < span > 기본</ span >
1286- </ div >
1287- < div
1288- className = { `bat-slot ${ dailyBatState . completedGames >= 1 ? 'is-owned' : 'is-locked' } ` }
1289- >
1290- < img
1291- className = "bat-thumb"
1292- src = "/utang-bat-gold-v093.png"
1293- alt = ""
1294- />
1295- < span > 황금</ span >
1296- </ div >
1297- < div
1298- className = { `bat-slot ${ dailyBatState . completedGames >= 2 ? 'is-owned' : 'is-locked' } ` }
1299- >
1300- < img
1301- className = "bat-thumb"
1302- src = "/utang-bat-diamond-v093.png"
1303- alt = ""
1304- />
1305- < span > 다이아</ span >
1306- </ div >
1300+ { BAT_COLLECTION . map ( ( { type, games } ) => (
1301+ < div
1302+ className = { `bat-slot ${ dailyBatState . completedGames >= games ? 'is-owned' : 'is-locked' } ` }
1303+ key = { type }
1304+ >
1305+ < img
1306+ className = { `bat-thumb ${ type === 'basic' ? 'bat-thumb-basic' : '' } ` }
1307+ src = { BAT_ICONS [ type ] }
1308+ alt = ""
1309+ />
1310+ < span > { BAT_LABELS [ type ] } </ span >
1311+ </ div >
1312+ ) ) }
13071313 </ div >
13081314 </ section >
13091315 < div className = "intro-ranking" >
@@ -1543,6 +1549,24 @@ export default function Home() {
15431549 />
15441550 </ div >
15451551 { umpire }
1552+ { contact && contact . outcome !== 'WHIFF' && (
1553+ < span
1554+ className = { `comic-contact-effect comic-${ RESULT_META [ contact . outcome ] . tier } ` }
1555+ aria-hidden = "true"
1556+ >
1557+ < b >
1558+ { contact . outcome === 'HOME_RUN'
1559+ ? '쾅!'
1560+ : contact . outcome === 'FOUL'
1561+ ? '탁!'
1562+ : '딱!' }
1563+ </ b >
1564+ < i />
1565+ < i />
1566+ < i />
1567+ < i />
1568+ </ span >
1569+ ) }
15461570 { contact ?. outcome === 'HOME_RUN' && (
15471571 < span className = "batter-impact-bubble" aria-hidden = "true" >
15481572 !!
@@ -1763,7 +1787,7 @@ export default function Home() {
17631787 < Trophy size = { 16 } /> 오늘 잘 친 우땅이 TOP 3
17641788 </ div >
17651789 { records . slice ( 0 , 3 ) . map ( ( item , index ) => (
1766- < div className = " ranking-row" key = { `${ item . playedAt } -${ index } ` } >
1790+ < div className = { ` ranking-row rank- ${ index + 1 } ` } key = { `${ item . playedAt } -${ index } ` } >
17671791 < b > { index + 1 } </ b >
17681792 < span > { item . nickname } </ span >
17691793 < strong > { item . score . toLocaleString ( ) } 점</ strong >
@@ -1805,7 +1829,7 @@ export default function Home() {
18051829 < dialog
18061830 open
18071831 className = "bat-reward-overlay"
1808- aria-label = { `${ batReward === 'gold' ? '황금' : '다이아몬드' } 배트 획득` }
1832+ aria-label = { `${ BAT_LABELS [ batReward ] } 배트 획득` }
18091833 >
18101834 < div className = { `bat-reward-card reward-${ batReward } ` } >
18111835 < span
@@ -1821,18 +1845,10 @@ export default function Home() {
18211845 ✦
18221846 </ span >
18231847 < small > 오늘의 플레이 보상</ small >
1824- < h2 >
1825- { batReward === 'gold'
1826- ? '황금배트를 얻어따!'
1827- : '다이아몬드배트를 얻어따!' }
1828- </ h2 >
1848+ < h2 > { BAT_LABELS [ batReward ] } 배트를 얻어따!</ h2 >
18291849 < img
1830- src = {
1831- batReward === 'gold'
1832- ? '/utang-bat-gold-v093.png'
1833- : '/utang-bat-diamond-v093.png'
1834- }
1835- alt = { batReward === 'gold' ? '황금배트' : '다이아몬드배트' }
1850+ src = { BAT_ICONS [ batReward ] }
1851+ alt = { `${ BAT_LABELS [ batReward ] } 배트` }
18361852 />
18371853 < Button type = "button" onClick = { ( ) => setBatReward ( null ) } >
18381854 확인
0 commit comments