--
--	LuaScriptFile "scripts/roguelikemode_kor.lua"
--  CustomUpgradesFile mvm_upgrades_clickin_v8_roguelike_v2.txt
--	ExtendedUpgradesOnly 1

--		Explanation
--		{
--			Line "{#ff0000}이젠 안쓰는 파일"
--			Line "{#ff0000}미션보는거 외에는 사용안함"
--		}

--[[Global variables 
    MenuCapacity - How many upgrades can be stored in the menu, keep as integer
	Note that the sourcemod menu has a 512 byte limit, try to keep names/descriptions short
	Byte limit as opposed to a character limit means that inserting unicode characters which contain more than 1 byte
	will use up more of the limit
	
	You can use special characters like \n in sourcemod menus
	
	If you go above 7 selections (6+1 reroll selections) the sourcemod menu will display the Next and Previous buttons
	Personally I find this to be a bit clunky so I would stick with using a MenuCapacity of 6, 7 if you want to
	prevent accidental rerolls
	
TotalUpgradePoints - Determines the starting amount of upgrade points on wave 1, and for any late joiners, keep as integer

TotalRerollPoints - Determines the starting amount of upgrade points on wave 1, and for any late joiners, keep as integer]]

MenuCapacity = 5 --6 -- 상점에 팝업되는 메뉴의 수 6 = 5개의 항목 + 리롤
TotalUpgradePoints = 4 -- 웨이브 1 에 지급되는 선택 횟수(8/10/12)/(11/13)
TotalRerollPoints = 100 -- 웨이브 1에 지급되는 리롤 횟수(4/5/6)/(5/6)


--[[AllShops is a table that controls what upgrades are shown to players, based on what class they are
	Note that it uses the game's interal reference for classes, which is different from their class selection screen order
	
	Each class can have any number of subtables or sub categories, I use this to define four different rarities
	
	You can also go for a shared upgrade pool between all classes, or Demo and Soldier etc.]]

--attributes are defined as text on menu, attribute name, min, increment, max

--[[The 1st field is actually the most important, as it used to uniquely identify upgrades, this allows the second field
	to exist beyond just attributes, and you can utilize "custom" to write a function that can do anything, as shown in
	Max Ammo and Mixed Concotion On Hit
	
	Note that max is typicallly optional for attributes, and if you're using "custom", min increment and max are also optional
	and can be defined in the AddUpgrade function instead]]
	
--	어트리뷰트 문법 {"상점 표기 업그레이드 이름", "어트리뷰트 이름" 기준점, 상승/하락폭, 최대/최저 수치} 최대/최저 수치는 적지않으면 MAX 없음
--  어트리뷰트 이름 작성시 "," 가 들어갈시 오류발생함 / 로 바꾸는것을 추천

AllShops =
{
	[1] = --Scout Shop [참조 하는 배열][주석 1]
	{
		CommonAttribute =
		{
			{"피해량 +25%", "damage bonus",1,0.25,2},
			{"장탄수 +50%", "clip size bonus",1,0.5,3.5},
			{"공격 속도 +10%", "fire rate bonus",1,-0.1,0.6},
 			{"재장전 속도 +20%", "faster reload rate",1,-0.2,0.4},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"모든탄약 50%증가", "custom",1,0.5,3.5},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"[3속성] 저항력+25%", "custom",1,1,4},
			{"[치명타] 저항력+45%", "dmg taken from crit reduced",1,-0.45,0.1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			
			--{"탄환 피해 저항력 +25%", "dmg taken from bullets reduced",1,-0.25,0.1},
			--{"폭발 피해 저항력 +25%", "dmg taken from blast reduced",1,-0.25,0.1},
			--{"화염 피해 저항력 +25%", "dmg taken from fire reduced",1,-0.25,0.1},
			--{"근거리 피해 저항력 +30%", "dmg from melee increased",1,-0.3,0.1},
			--{"꼴깍", "effect cond override",0,24349,24349},  -- ???+???(곱하기)256+???(곱하기)65536 = ???+2번째곱한거+3번째곱한거=더하기 합
		},
		RareAttribute =
		{
			{"( R ) 탄환 관통", "projectile penetration",0,1,1},
			{"( R ) 적에게 우유 적중시 이속감소", "applies snare effect",1,-0.35,0.65},
			{"( R ) 적중 시 5초간 이동속도 증진", "speed_boost_on_hit",0,5,5},
			{"( R ) 로봇 센트리 무시", "ignored by enemy sentries",0,1,1},
			{"( R ) 적 적중시 화염", "custom",0,1,1},
			{"( R ) 처치 시 소형치료제", "drop health pack on kill",0,1,1},
			{"( R ) 전투스카웃 특화[폭팔탄]", "custom",0,1,1},
			--봉크캔
			{"( R ) <음료수/식칼금지>방어음료", "effect cond override",0,10831,10831},
			{"( R ) <음료수/식칼금지>응급조치", "effect cond override",0,73,73},
			
			--{"( R ) 추가 점프 횟수 +1", "air dash count",0,1},
			--{"( R ) 투사체 피해량 +400%"",},[[공, 방울, 혈적자 등. 피해량 0인건 냅둠]]
			--{"( R ) 투사체 적중 대상이 2초 내로 사망시 투사체 재충전"",},[[어시스트 포함]]
			--{"( R ) 기절/둔화 면역", "custom",0,1,1},
		},
		EpicAttribute =
		{
			{"{ U } 모든 받는 치료량 +50%", "healing received bonus",1,0.5,3},
			{"{ U } 거대로봇/탱크 추가데미지", "custom",0,1,1,},
			{"{ U } 발사탄환 +25% 증가", "bullets per shot bonus",1,0.25,1.75},
			{"{ U } 재장전을 한번에 다 함", "reload full clip at once",0,1,1},
			{"{ ?? } 초당 체력-7젠/처치시과치료", "custom",0,1,3},
			{"{ U } <식칼금지>사거리별 뎀감없음", "custom",0,1,1},
			--봉크캔
			{"{ U } <음료수/식칼금지>철의 장막", "effect cond override",0,11562,11562},
			{"{ U } <음료수/식칼금지>공속+장전속", "effect cond override",0,113,113},
			
			--{"{ SR } 전차 대상 피해량 +50%", "mult dmg vs tanks",1,0.5},
			--{"{ SR } 상태이상 지속 시간 -75%",}, [[말 그대로]]
		},
		LegendaryAttribute =
		{
			{"【 EP 】 점프시 소형치명타공격/점프횟수 7증가", "air dash count",0,7,7},
			{"【 EP 】 공격속도 감소/데미지 극대화", "custom",0,1,1},
			{"【 EP 】 적 적중시 병수도효과", "custom",0,1,1},
			{"【 EP 】 헤드샷 활성화/집탄률MAX", "custom",0,1,1,},
			{"【 EP 】 치명타피해량 추가증가", "mult crit dmg",1,0.15,1.15},
			{"【 ??! 】 받는피해증가/초당 300씩회복", "custom",0,1,1},
			{"【 ??! 】 체력이 적을수록 데미지증가", "custom",0,1,1},
			{"【 EP 】 데미지 추가증가[스카웃1]", "custom",0,1,1},
			{"【 EP 】 데미지 추가증가[스카웃2]", "custom",0,1,1},
			{"【 ??! 】 팀킬활성화를 댓가로 적중시 3초치명타", "custom",0,1,1},
			{"【 ??! 】 옭옭쟁이 퐁키[하찮고 소중해]", "custom",0,1,1},
			{"【 ??! 】 체력이 16% 미만일때 치명타공격", "custom",0,1,1},
			{"【 EP 】 적 적중시 절단기 도발효과", "aoe heal chance",0,600,600},
			{"【 EP 】 적 처치시 은폐[단 적중시 은폐해제]", "custom",0,1,1},
			{"【 EP 】 적 적중시 공격속도감소효과", "custom",0,1,1},
			{"【 ??! 】 같은클처치시공속3중첩/다른클이면초기화", "custom",0,1,1},
			--근본
			{"【 EP 】 <식칼금지>더 컴퍼니[태고의 힘]", "custom",0,1,1,},
			{"【 EP 】 <식칼금지>버스트 파이어[빠른사격]", "custom",0,1,1},
			--봉크캔
			{"【 EP 】 <음료수/식칼금지>치명타", "effect cond override",0,34,34},
			{"【 EP 】 <음료수/식칼금지>무적우버", "effect cond override",0,52,52},
			{"【 EP 】 <음료수/식칼금지>두려워하라", "effect cond override",0,74,74},
			--식칼
			{"【 ??! 】 <더 컴퍼니X>식칼: 메테오 샤워", "custom",0,1,1},
			{"【 ??! 】 <더 컴퍼니X>식칼: Nuclear Weapon", "custom",0,1,1},
			
			--{"【 SSR 】 소형 치명타를 치명타로 전환", "minicrits become crits",0,1,1},
			--{"【 SSR 】 밟은 적을 기절시킴",}, [[밟은 후 위로 튀어오름, 이단 점프는 초기화 안 함]]
			--{"【 SSR 】 처치 시 2초간 치명타 증진", "critboost on kill",0,2,2},
			--{"【 SSR 】 적중 시 죽음의 표식 부착", "mark for death",0,1,1},
		}
	},
	[3] = --Soldier Shop
	{
		CommonAttribute =
		{
			{"피해량 +25%", "damage bonus",1,4.8,5.8},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"공격 속도 +10%", "fire rate bonus",1,-0.4,0.6},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"최대체력 +25", "max health additive bonus",0,25,100},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"이동속도 +10%", "move speed bonus",1,10,11},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"[3속성] 저항력+25%", "custom",0,1,1},
			{"[치명타] 저항력+45%", "dmg taken from crit reduced",1,-0.9,0.1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"적중 시 체력 10 회복", "heal on hit for rapidfire",0,10,20},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			--샷건
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			--솔무라이
			{"<사무라이>체력증가/추가데미지", "custom",0,1,1},
			{"( R ) <사무라이>반맹인특화/사거리증가", "custom",0,1,1},
			
			--{"탄환 피해 저항력 +25%", "dmg taken from bullets reduced",1,-0.25,0.1},
			--{"폭발 피해 저항력 +25%", "dmg taken from blast reduced",1,-0.25,0.1},
			--{"화염 피해 저항력 +25%", "dmg taken from fire reduced",1,-0.25,0.1},
			--{"근거리 피해 저항력 +30%", "dmg from melee increased",1,-0.3,0.1},
			--{"깃발: 분노 획득량 +25%", "rage giving scale",1,0.25},
			--{"탈출계획: 더이상 소형 치명타를 받지 않음",},
			--{"솔저 테스트", "custom",0,1,1},
		},
		RareAttribute =
		{
			{"( R ) 로켓 특화/탄환 관통", "custom",0,1,1},
			{"( R ) 낙하피해 무시", "cancel falling damage",0,1,1},
			{"( R ) 깃발 증진 지속시간+25%", "increase buff duration",1,0.25,1.75},
			{"( R ) 처치 시 소형치료제", "drop health pack on kill",0,1,1},
			{"( R ) 적 적중시 화염", "custom",0,1,1},
			{"( R ) 폭발범위 16% 증가", "Blast radius increased",1,0.16,1.64},
			--근본
			{"( R ) <로켓전용/중첩안됨>곡사로켓[중력로켓]", "custom",0,1,1},
			{"( R ) <로켓전용/중첩안됨>부메랑로켓", "custom",0,1,1},
			--전복자
			{"( R ) <깃발개조/중첩안됨>광역힐/과치료", "effect cond override",0,73,73},
			--샷건
			{"( R ) <샷건>샷건:발사탄환 +10%증가", "bullets per shot bonus",1,0.1,1.3},
			--솔무라이
			{"( R ) <사무라이>반맹인특화/사거리증가", "custom",0,1,1},
			
			--{"( R ) 깃발: 분노 획득량 +75%", "rage giving scale",1,0.75,2.5},
			--{"( R ) 추가 점프 횟수 +1", "air dash count",0,1},
			--{"( R ) 사망에 이를시 즉시 뒤로 로켓점프, 이 상태에서 지면에 닿기 전까지 무적 상태가 됨",},[[전방에 피해 500을 주며 뒤로 날아감, 쿨타임 40초]]
			--{"( R ) 근접 피해량 +100%, 근접 처치시 체력, 탄약 +35% 회복",},
		},
		EpicAttribute =
		{
			{"{ U } 깃발 증진 반경+70%", "mod soldier buff range",1,0.7,3.8},
			--{"{ U } 처치시 5초간 이동속도 증진", "speed_boost_on_kill",0,5,5},
			--{"{ U } 투사체 반사/파괴 불가", "projectile no deflect",0,1,1},
			--{"{ U } 모든 받는 치료량 +50%", "healing received bonus",1,0.5,3},
			{"{ U } 거대로봇/탱크 추가데미지", "custom",0,1,1,},
			--{"{ U } 로켓투사체 +2증가/데미지 감소", "custom",0,1,4},
			--{"{ ?? } 초당 체력-7젠/처치시과치료", "custom",0,1,3},
			--근본
			--{"{ U } <로켓전용>데미지 추가증가", "custom",0,1,1},
			--{"{ U } <로켓전용/중첩안됨>로켓 조종가능", "custom",0,1,1},
			--{"{ U } <로켓전용/중첩안됨>직격포 '500배'", "custom",0,1,1},
			--{"{ U } <로켓전용>하늘을 나는 솔저", "custom",0,1,1},
			--전복자
			{"{ U } <깃발개조/중첩안됨>공속/재장전 증가", "effect cond override",0,113,113},
			{"{ U } <깃발개조/중첩안됨>방어력 버프", "effect cond override",0,11562,11562},
			--샷건
			--{"{ U } <샷건>샷건데미지 추가증가", "custom",0,1,1},
			--{"{ U } <샷건>샷건:부대지원 효과 무시", "custom",0,1,1},
			--솔무라이
			{"{ U } <사무라이>적 피해량감소 디버프", "custom",0,1,1},
			{"{ U } <사무라이>솔무라이 이속강화", "custom",0,1,1},
			
			--{"{ SR } 전차 대상 피해량 +50%", "mult dmg vs tanks",1,0.5},
			--{"{ SR } 체공중 피해, 밀어냄 저항 +50%",}, --[[공중에 떠있는 동안 적용]]
		},
		LegendaryAttribute =
		{
			--{"【 EP 】 로켓발사기 폭팔범위 최대피해", "dmg falloff decreased",1,-0.5,0.5},
			--{"【 EP 】 로켓발사기 폭팔범위내 적 수만큼 추뎀", "add damage per target",0,0.03,0.03},
			--{"【 EP 】 로켓발사기 폭팔범위 대폭증가", "custom",0,1,1},
			--{"【 ??! 】 The Lost[방어력 999감소/데미지극대화]", "custom",0,1,1},
			{"【 EP 】 진각성: 연단된 칼날[태고의 힘]", "custom",0,1,1},
			{"【 EP 】 적 적중시 미치광이우유효과", "custom",0,1,1},
			{"【 ??! 】 체력이 적을수록 데미지증가", "custom",0,1,1},
			{"【 EP 】 치명타피해량 추가증가", "mult crit dmg",1,0.15,1.15},
			{"【 ??! 】 팀킬활성화를 댓가로 적중시 3초치명타", "custom",0,1,1},
			{"【 EP 】 데미지 추가증가[솔저1]", "custom",0,1,1},
			--{"【 ??! 】 받는피해증가/초당 300씩회복", "custom",0,1,1},
			--{"【 ??! 】 옭옭쟁이 퐁키[하찮고 소중해]", "custom",0,1,1},
			{"【 ??! 】 거대화/체력증가[로켓점프 불가능]", "custom",0,1,1},
			--{"【 ??! 】 체력이 16% 미만일때 치명타공격", "custom",0,1,1},
			--{"【 EP 】 적 적중시 절단기 도발효과", "aoe heal chance",0,600,600},
			--{"【 ??! 】 같은클처치시공속3중첩/다른클이면초기화", "custom",0,1,1},
			--{"【 EP 】 <거지포>한번에 발사", "custom",0,1,1},
			--{"【 EP 】 스탠바이-레디[깃발 활성화시 공속증]", "custom",0,1,1},
			--근본
			--{"【 EP 】 <로켓특성/중첩안됨>적 추적로켓", "custom",0,1,1},
			--전복자
			{"【 EP 】 <깃발개조/중첩안됨>사기/부대/전복 3중첩", "effect cond override",0,1907216,1907216}, -- 16+26*256+29*65536 = 16+6656+1900544=1907216
			{"【 EP 】 <깃발개조/중첩안됨>치명타", "effect cond override",0,34,34},
			{"【 EP 】 <깃발개조/중첩안됨>무적우버", "effect cond override",0,52,52},
			{"【 EP 】 <깃발개조/중첩안됨>두려워하라", "effect cond override",0,74,74},
			--샷건
			--{"【 EP 】 <샷건>샷건으로 적 적중시 공속감소", "custom",0,1,1},
			--{"【 EP 】 <샷건>헤드샷 활성화/집탄률MAX", "custom",0,1,1},
			--솔무라이
			{"【 EP 】 <사무라이>반맹인 공속증가", "custom",0,1,2},
			
			--{"【 SSR 】 처치 시 1초간 치명타 증진", "critboost on kill",0,1,2},
			--{"【 SSR 】 적중 시 죽음의 표식 부착", "mark for death",0,1,1},
			--{"【 SSR 】 모든 받는 치료량 +100%", "healing received bonus",1,1},
			--{"【 SSR 】 소형 치명타 발생시 크리티컬로 전환", "minicrits become crits",0,1,1},
			--{"【 SSR 】 로켓이 조준점으로 유도됨, 자해 피해 -50%",},[[로켓 유도율, 선회 속도는 맘대로]]
			--{"【 EP 】 <전복자>얼리전트[예접우버]", "effect cond override",0,3947322,3947322}, -- 58+59*256+60*65536 = 58+15104+3932160=3947322
		}
	},
	[7] = --Pyro Shop
	{
		CommonAttribute =
		{
			{"피해량 +25%", "damage bonus",1,0.25,2},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"모든탄약 50%증가", "custom",1,0.5,3.5},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"[3속성] 저항력+25%", "custom",1,1,4},
			{"[치명타] 저항력+45%", "dmg taken from crit reduced",1,-0.45,0.1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"5초 마다 최대 탄약의 10% 보급", "ammo regen",0,0.1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			
			--{"반사 시킨 투사체 속도 +100%", "mult reflect velocity",1,1},
			--{"근거리 피해 저항력 +30%", "dmg from melee increased",1,-0.3,0.1},
			--{"탄환 피해 저항력 +25%", "dmg taken from bullets reduced",1,-0.25,0.1},
			--{"폭발 피해 저항력 +25%", "dmg taken from blast reduced",1,-0.25,0.1},
			--{"화염 피해 저항력 +25%", "dmg taken from fire reduced",1,-0.25,0.1},
			--{"네온 전멸기: 들고 있을 시 이동 속도 +75%, 치명타 피해량이 주변으로 퍼짐",},[[힛 앤 런]]
			--{"조명탄", "custom",0,1,1},
		},
		RareAttribute =
		{
			{"( R ) 화염 강타[용격제외 화염사거리 증가]", "flame_drag",0,-2.5,-10},
			{"( R ) <용의격노>사격 후 딜레이 10%감소", "mult_item_meter_charge_rate",1,-0.1,0.3},
			{"( R ) <가스패서>폭발 활성화", "explode_on_ignite",0,1,1},
			{"( R ) 추가 점프 횟수 +1", "air dash count",0,1,1},
			{"( R ) <붕붕이> 탄약 소모량 -35%", "airblast cost decreased",1,-0.35,0.3},
			{"( R ) 처치 시 5초간 이동속도 증진", "speed_boost_on_kill",0,5,5},
			{"( R ) 적중 시 대상 이동속도 감소", "slow enemy on hit",0,1,1},
			{"( R ) 로봇 센트리 무시", "ignored by enemy sentries",0,1,1},
			{"( R ) 화상 피해 +150%", "weapon burn dmg increased",1,1.5,6},
			{"( R ) 조명총/반사투사체:폭발반경+40%", "Blast radius increased",1,0.4},
			{"( R ) 처치 시 소형치료제", "drop health pack on kill",0,1,1},
			--조명탄
			{"( R ) <조명탄/중첩안됨>텔레포터 탄환", "custom",0,1,1},
			
			--{"( R ) 받는 범위 폭발피해 -30%",}, [[직격 제외]]
			--{"( R ) 기절/둔화 면역", "custom",0,1,1},
		},
		EpicAttribute =
		{
			{"{ U } 적중 시 체력4회복", "heal on hit for rapidfire",0,4,8},
			{"{ U } 모든무기 백버너 후방치명타 카피", "mod flamethrower back crit",0,1,1},
			{"{ U } 모든 받는 치료량 +50%", "healing received bonus",1,0.5,3},
			{"{ U } <붕붕이> 밀치는 힘 강화", "airblast pushback scale",1,0.8,4.2},
			{"{ U } 거대로봇/탱크 추가데미지", "custom",0,1,1,},
			{"{ ?? } 초당 체력-7젠/처치시과치료", "custom",0,1,3},
			--조명탄
			{"{ U } <조명탄/중첩안됨>가스패서 3개투척", "custom",0,1,1},
			
			--{"{ SR } 전차 대상 피해량 +50%", "mult dmg vs tanks",1,0.5},
			--{"{ SR } 사망 시 자폭 확률 75%",}, [[피해량 300]]
		},
		LegendaryAttribute =
		{
			{"【 EP 】 <붕붕이>재사용 대기 시간 -70%", "mult airblast refire time",1,-0.7,0.3},
			{"【 EP 】 불에 타고있는 적 추가데미지", "damage bonus vs burning",1,0.3,1.3},
			{"【 EP 】 불의 숨이 멎을때가 왔다[태고의 힘]", "custom",0,1,1},
			{"【 EP 】 적 적중시 미치광이우유효과", "custom",0,1,1},
			{"【 EP 】 데미지 추가증가[파이로1]", "custom",0,1,1},
			{"【 EP 】 데미지 추가증가[파이로2]", "custom",0,1,1},
			{"【 EP 】 데미지 추가증가[파이로3]", "custom",0,1,1},
			{"【 EP 】 치명타피해량 추가증가", "mult crit dmg",1,0.21,1.21},
			{"【 ??! 】 체력이 적을수록 데미지증가", "custom",0,1,1},
			{"【 ??! 】 받는피해증가/초당 300씩회복", "custom",0,1,1},
			{"【 ??! 】 팀킬활성화를 댓가로 적중시 3초치명타", "custom",0,1,1},
			{"【 ??! 】 옭옭쟁이 퐁키[하찮고 소중해]", "custom",0,1,1},
			{"【 EP 】 <플로지>필요게이지감소/지속시간증가", "custom",0,1,1},
			{"【 ??! 】 체력이 16% 미만일때 치명타공격", "custom",0,1,1},
			{"【 EP 】 적 적중시 절단기 도발효과", "aoe heal chance",0,600,600},
			--버프
			{"【 EP 】 <화방/중첩안됨>화상 다단히트 강화", "custom",0,1,1},
			{"【 EP 】 <화방/중첩안됨>적 이속감소/소형봇스턴", "custom",0,1,1},
			{"【 EP 】 <화방/중첩안됨>적 공속감소 디버프효과", "custom",0,1,1},
			--조명탄
			{"【 EP 】 <조명탄/중첩안됨>테슬라 볼트", "custom",0,1,1},
			{"【 EP 】 <조명탄/중첩안됨>메테오 샤워", "custom",0,1,1},
			{"【 EP 】 <조명탄/중첩안됨>모노큘러스 소환", "custom",0,1,1},
			
			--{"【 SSR 】 적중 시 죽음의 표식 부착", "mark for death",0,1,1},
			--{"【 SSR 】 처치 시 1초간 치명타 증진", "critboost on kill",0,1,2},
			--{"【 SSR 】 불타는 적에게 피해량 -40%",},[[알아서 밸런스 조절하셈]]
			--{"【 SSR 】 화염수명+500%", "custom",0,1,1}, --화염 수명 5배, 오래있을수록 화염크기 증가(고장)
		}
	},
	[4] = --Demoman Shop
	{
		CommonAttribute =
		{
			{"피해량 +25%", "damage bonus",1,0.25,2},
			{"장탄수 +50%", "clip size bonus",1,0.5,3.5},
			{"공격 속도 +10%", "fire rate bonus",1,-0.1,0.6},
			{"재장전 속도 +20%", "faster reload rate",1,-0.2,0.4},
			{"처치 시 체력 25 회복", "heal on kill",0,25,100},
			{"최대체력 +25", "max health additive bonus",0,25,100},
			{"모든탄약 50%증가", "custom",1,0.5,3.5},
			{"이동속도 +10%", "move speed bonus",1,0.1},
			{"점프높이 +20%", "increased jump height",1,0.2,1.6},
			{"<방패>재충전속도 +100%", "charge recharge rate increased",1,1,4},
			{"[3속성] 저항력+25%", "custom",1,1,4},
			{"[치명타] 저항력+45%", "dmg taken from crit reduced",1,-0.45,0.1},
			{"초당 체력 회복량+4", "health regen",0,4,20},
			{"5초 마다 최대 탄약의 10% 보급", "ammo regen",0,0.1,1},
			{"적중 시 체력10회복", "heal on hit for rapidfire",0,10,20},
			{"투사체 비행속도 25%증가", "Projectile speed increased",1,0.25,2},
			{"밀어내기 저항력+20%", "damage force reduction",1,-0.2,0.01},
			{"무기 전환속도 +20%", "deploy time decreased",1,-0.2,0.2},
			{"낙하산:무한 재사용 가능", "parachute redeploy",0,1,1},
			{"폭발로 공중에 뜬 대상 소형치명타", "mod mini-crit airborne",0,1,1},
			
			--{"방패: 돌격 충돌 피해 +100%", "charge impact damage increased",1,1},
			--{"탄환 피해 저항력 +25%", "dmg taken from bullets reduced",1,-0.25,0.1},
			--{"폭발 피해 저항력 +25%", "dmg taken from blast reduced",1,-0.25,0.1},
			--{"화염 피해 저항력 +25%", "dmg taken from fire reduced",1,-0.25,0.1},
			--{"근거리 피해 저항력 +30%", "dmg from melee increased",1,-0.3,0.1},
		},
		RareAttribute =
		{
			{"( R ) 추가 점프 횟수 +1", "air dash count",0,1,1},
			{"( R ) 낙하피해 무시", "cancel falling damage",0,1,1},
			{"( R ) 투사체 반사/파괴 불가", "projectile no deflect",0,1,1},
			{"( R ) <방패>돌격 완전제어", "custom",0,1,1},
			{"( R ) 처치 시 소형치료제", "drop health pack on kill",0,1,1},
			{"( R ) 폭발범위 16% 증가", "Blast radius increased",1,0.16,1.64},
			--흑기사
			{"( R ) <흑기사>근접 범위공격", "custom",0,1,1},
			{"( R ) <흑기사>너비/사거리 증가", "custom",0,1,9},
			--점착
			{"( R ) <점착>적에게 붙는 점착", "custom",0,1,1},
			{"( R ) <점착>폭탄 설치량 +2추가", "max pipebombs increased",1,2,11},
			--유탄
			{"( R ) <유탄>유탄 벽 충돌시 폭팔", "custom",0,1,1},
			
			--{"( R ) 전차 대상 피해량 +50%", "mult dmg vs tanks",1,0.5},
			--{"( R ) 기절/둔화 면역", "custom",0,1,1},
		},
		EpicAttribute =
		{
			{"{ U } 처치 시 5초간 이동속도 증진", "speed_boost_on_kill",0,5,5},
			{"{ U } 데미지 추가증가[데모맨1]", "custom",0,1,1},
			{"{ U } 거대로봇/탱크 추가데미지", "custom",0,1,1,},
			{"{ U } 모든 받는 치료량 +50%", "healing received bonus",1,0.5,3},
			{"{ ?? } 초당 체력-7젠/처치시과치료", "custom",0,1,3},
			--흑기사
			{"{ U } <흑기사>체력 추가증가", "custom",0,1,4},
			{"{ U } <흑기사>적중시 죽음의표식", "custom",0,1,1},
			{"{ U } <흑기사>방패 충돌피해9배", "custom",0,1,4},
			--유탄/점착
			{"{ U } <유탄/점착>적 방어력 감소", "custom",0,1,1},
			
			--{"{ SR } 술병 도발 후 무작위 우버차지를 얻음",}, [[무적, 크리, 응급, 무작위 예접, 10초지속]]
		},
		LegendaryAttribute =
		{
			{"【 EP 】 진각성: 연단된 칼날[태고의 힘]", "custom",0,1,1},
			{"【 ??! 】 체력이 적을수록 데미지증가", "custom",0,1,1},
			{"【 ??! 】 받는피해증가/초당 300씩회복", "custom",0,1,1},
			{"【 ??! 】 팀킬활성화를 댓가로 적중시 3초치명타", "custom",0,1,1},
			{"【 ??! 】 옭옭쟁이 퐁키[하찮고 소중해]", "custom",0,1,1},
			{"【 ??! 】 거대화/체력증가[유탄/점착점프 불가능]", "custom",0,1,1},
			{"【 ??! 】 체력이 16% 미만일때 치명타공격", "custom",0,1,1},
			{"【 EP 】 적 적중시 절단기 도발효과", "aoe heal chance",0,600,600},
			{"【 EP 】 적 적중시 미치광이우유효과", "custom",0,1,1},
			{"【 EP 】 데미지 추가증가[데모맨2]", "custom",0,1,1},
			{"【 EP 】 데미지 추가증가[데모맨3]", "custom",0,1,1},
			{"【 ??! 】 같은클처치시공속3중첩/다른클이면초기화", "custom",0,1,1},
			--흑기사
			{"【 EP 】 <흑기사>처치시 3초치명타", "custom",0,1,1},
			{"【 EP 】 <흑기사>적중시 이속감소", "custom",0,1,1},
			{"【 EP 】 <흑기사>치명타피해 증가", "custom",0,1,1},
			--점착
			{"【 EP 】 <점착>점착 바로충전[순삭점착고장]", "custom",0,1,1},
			--유탄
			{"【 EP 】 <유탄>유탄 이중발사", "custom",0,1,1},
			--유탄/점착
			{"【 EP 】 <유탄/점착>폭팔범위 최대피해", "dmg falloff decreased",1,-0.5,0.5},
			{"【 EP 】 <유탄/점착>폭범 적 수만큼 추뎀", "add damage per target",0,0.03,0.03},
			{"【 EP 】 <유탄/점착>폭팔범위 대폭증가", "custom",0,1,1},
			{"【 ??! 】 The Lost[방어력 999감소/데미지극대화]", "custom",0,1,1},
			{"【 EP 】 <유탄/점착>치명타피해 증가", "mult crit dmg",1,0.15,1.15},
			
			--{"【 SSR 】 소형 치명타 발생시 크리티컬로 전환", "minicrits become crits",0,1,1},
			--{"【 SSR 】 처치 시 1초간 치명타 증진", "critboost on kill",0,1,2},
			--{"【 SSR 】 적중 시 죽음의 표식 부착", "mark for death",0,1,1},
			--{"【 SSR 】 한번에 모두 발사함", "fire full clip at once",0,1,1},
			--{"【 SSR 】 모든 받는 치료량 +100%", "healing received bonus",1,1},
			--{"【 SSR 】 한 번에 적을 셋 이상 죽이면 탄창을 장전함, 해당 탄창 피해량 +30%",}, [[1발이라도 직접 장전시 사라짐]]
		}
	},
	[6] = --Heavy Shop
	{
		CommonAttribute =
		{
			{"공격 속도 +10%", "fire rate bonus",1,-0.1,0.6},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"모든탄약 50%증가", "custom",1,0.5,3.5},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"[3속성] 저항력+25%", "custom",1,1,4},
			{"[치명타] 저항력+45%", "dmg taken from crit reduced",1,-0.45,0.1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"탄환 관통", "projectile penetration heavy",0,1,3},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			--도시락
			{"<버팔로우스테이크>빨리 쳐먹기", "gesture speed increase",1,1.6,2.6},
			--근본
			{"<미니건>예열중 앉아서이동가능", "minigun full movement",0,1,1},
			--샷비
			{"<샷비>샷건:자동 산탄중화기", "custom",0,1,1},
			
			--{"근거리 피해 저항력 +45%", "dmg from melee increased",1,-0.45,0.1},
			--{"샷건: 장전이 필요 없어짐",}, --[[탄약이 알아서 장전됨]]
			--{"탄환 피해 저항력 +25%", "dmg taken from bullets reduced",1,-0.25,0.1},
			--{"폭발 피해 저항력 +25%", "dmg taken from blast reduced",1,-0.25,0.1},
			--{"화염 피해 저항력 +25%", "dmg taken from fire reduced",1,-0.25,0.1},
			--{"산탄총: 장탄수 +100%", "clip size bonus",1,1},
			--{"산탄총: 재장전 속도 +20%", "faster reload rate",1,-0.2,0.1},
			--{"도시락: 먹는 중 은신 상태가 됨",},[[데드링어]]
		},
		RareAttribute =
		{
			{"( R ) 추가 점프 횟수 +1", "air dash count",0,1,1},
			{"( R ) 투사체 파괴", "attack projectiles",0,1,2},
			{"( R ) 밀침 분노", "generate rage on damage",0,1,3},
			{"( R ) 적 적중시 화염", "custom",0,1,1},
			{"( R ) 적중 시 대상 이동속도 감소", "slow enemy on hit",0,1,1},
			{"( R ) 총열 회전 시 화염 고리 생성", "ring of fire while aiming",0,1,1},
			{"( R ) 총열 회전 중 무기 교체", "mod minigun can holster while spinning",0,1,1},
			{"( R ) 처치 시 소형치료제", "drop health pack on kill",0,1,1},
			--도시락
			{"( R ) <버팔로우스테이크>은폐[공격시 풀림]", "effect cond override",0,64,64},
			--근본
			{"( R ) <미니건>미니건피해량5%증가", "custom",0,1,4},
			--샷비
			{"( R ) <샷비>샷건피해량25%증가", "custom",0,1,4},
			
		},
		EpicAttribute =
		{
			{"{ U } 적중 시 체력 2 회복", "heal on hit for rapidfire",0,2,4},
			{"{ U } 적중 시 5초간 이동속도 증진", "speed_boost_on_hit",0,5,5},
			{"{ U } 발사탄환 +20% 증가", "bullets per shot bonus",1,0.2,1.4},
			{"{ U } 모든 받는 치료량 +50%", "healing received bonus",1,0.5,3},
			{"{ U } 거대로봇/탱크 추가데미지", "custom",0,1,1,},
			{"{ ?? } 초당 체력-7젠/처치시과치료", "custom",0,1,3},
			--도시락
			{"{ U } <버팔로우스테이크>공속증가", "effect cond override",0,113,113},
			{"{ U } <버팔로우스테이크>응급조치", "effect cond override",0,73,73},
			{"{ U } <버팔로우스테이크>철의 장막", "effect cond override",0,11562,11562},
			--샷비
			{"{ U } <샷비>샷건 공속증가", "custom",0,1,3},
			
			--{"{ SR } 산탄총 : 재장전이 필요하지 않음", "faster reload rate",1,-1,0},
			--{"{ SR } 주변 아군의 피해 저항 +15%",}, [[범위는 깃발과 동일]]
		},
		LegendaryAttribute =
		{
			{"【 EP 】 거대화/체력증가", "custom",0,1,1},
			{"【 EP 】 K-6 중기관총[처참한공속/깡추뎀]", "custom",0,1,1},
			{"【 EP 】 스펙트럴 서치 아이[태고의 힘]", "custom",0,1,1},
			{"【 EP 】 헤드샷 활성화/집탄률MAX", "custom",0,1,1},
			{"【 EP 】 데미지 추가증가[헤비1]", "custom",0,1,1},
			{"【 ??! 】 체력이 적을수록 데미지증가", "custom",0,1,1},
			{"【 ??! 】 받는피해증가/초당 300씩회복", "custom",0,1,1},
			{"【 ??! 】 팀킬활성화를 댓가로 적중시 3초치명타", "custom",0,1,1},
			{"【 EP 】 치명타피해량 추가증가", "mult crit dmg",1,0.15,1.15},
			{"【 ??! 】 옭옭쟁이 퐁키[하찮고 소중해]", "custom",0,1,1},
			{"【 ??! 】 체력이 16% 미만일때 치명타공격", "custom",0,1,1},
			{"【 EP 】 적 적중시 절단기 도발효과", "aoe heal chance",0,600,600},
			{"【 ??! 】 같은클처치시공속3중첩/다른클이면초기화", "custom",0,1,1},
			--도시락
			{"【 EP 】 <버팔로우스테이크>두려워하라", "effect cond override",0,74,74},
			{"【 EP 】 <버팔로우스테이크>극강의방어력", "effect cond override",0,4795690,4795690},
			--특수
			{"【 EP 】 <미니건>Triple Rocket", "custom",0,1,1},
			{"【 EP 】 <미니건>4중 디버프탄환", "custom",0,1,1},
			{"【 EP 】 <미니건>K-4 고속유탄기관총", "custom",0,1,1},
			{"【 EP 】 <미니건>뎀증영향없는합선기탄", "custom",0,1,1},
			{"【 EP 】 <미니건>수속성 빙결탄환", "custom",0,1,1},
			{"【 ??! 】 <미니건>끌어당기는 그래플탄", "custom",0,1,1},
			--샷비
			{"【 EP 】 <샷비>부대지원 효과 무시/추뎀", "custom",0,1,1},
			{"【 EP 】 <샷비>적 공속감소 디버프효과", "custom",0,1,1},
			
			--{"【 SSR 】 적중 시 죽음의 표식 부착", "mark for death",0,1,1},
			--{"【 SSR 】 처치 시 1초간 치명타 증진", "critboost on kill",0,1,2},
			--{"【 SSR 】 소형 치명타 발생시 크리티컬로 전환", "minicrits become crits",0,1,1},
			--{"【 SSR 】 치료 광선이 연결된 메딕이 받는 피해를 대신 받음",},
			--{"【 SSR 】 메딕이 치료하는 동안 피해량 +30%", "mod medic healed damage bonus",1,0.3,1.3},
		}
	},
	[9] = --Engineer Shop
	{
		CommonAttribute =
		{
			{"<<중요>>미션만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>미션만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>미션만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>미션만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>미션만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>미션만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>미션만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>미션만들기 스타터팩", "custom",0,1,1},
			
			--{"근거리 피해 저항력 +30%", "dmg from melee increased",1,-0.3,0.1},
			--{"탄환 피해 저항력 +25%", "dmg taken from bullets reduced",1,-0.25,0.1},
			--{"폭발 피해 저항력 +25%", "dmg taken from blast reduced",1,-0.25,0.1},
			--{"화염 피해 저항력 +25%", "dmg taken from fire reduced",1,-0.25,0.1},
			--{"무기: 장탄수 +50%", "clip size bonus",1,0.5},
			--{"건설 속도 +25%", "build rate bonus",1,-0.25,0},
			--{"렌치 타격 시 건설 속도 +30%", "Construction rate increased",1,0.3},
			--{"업그레이드 효율 +20%", "upgrade rate decrease",1,0.2},
			--{"탄약 상자/디스펜서 에서 얻는 금속량 +25%", "metal_pickup_decreased",1,0.25},
		},
		RareAttribute =
		{
			{"( R ) 적중 시 5초간 이동속도 증진", "speed_boost_on_hit",0,5,5},
			{"( R ) 적 적중시 화염", "custom",0,1,1},
			{"( R ) 추가 점프 횟수 +1", "air dash count",0,1,1},
			{"( R ) 센트리 건 사정거리 +50%", "engy sentry radius increased",1,0.5,2.5},
			{"( R ) 디스펜서 특화[회복/금속 보급]", "mult dispenser rate",1,0.5},
			{"( R ) 텔레포터 고강화", "custom",0,1,1},
			{"( R ) 처치 시 소형치료제", "drop health pack on kill",0,1,1},
			{"( R ) 미니센트리 추가[업그레이드 적용]", "engy disposable sentries",0,2,8},
			--근본
			{"( R ) <렌치>건물크기증가/막자강화", "custom",0,1,1},
			{"( R ) <렌치>렌치/구조대원 효율강화", "custom",0,1,3},
			{"( R ) <렌치>3레벨센트리 로켓특화", "custom",0,1,1},
			--전투
			{"( R ) <총잡이>총잡이착용시 로켓센트리", "custom",0,1,1},
			{"( R ) <총잡이>발사탄환 +15%증가", "custom",0,1,2},
			{"( R ) <총잡이>샷건특화/데미지증가", "custom",0,1,1},
			
			--{"( R ) 무기: 전차 대상 피해량 +50%", "mult dmg vs tanks",1,0.5},
			--{"( SR ) 텔레포터 사용 후 이동속도 증진", "mod teleporter speed boost",0,1,1},
			--{"양방향 텔레포터", "bidirectional teleport",0,1,1},
		},
		EpicAttribute =
		{
			{"{ U } 5초 마다 금속 50 보급", "metal regen",0,50,200},
			{"{ U } 타격시 건물 단계 바로 증가", "upgrade rate decrease",1,7,8},
			{"{ U } 센트리 건 목표 대상 피해량 +20%", "damage bonus bullet vs sentry target",1,0.2,1.2},
			{"{ U } 모든 받는 치료량 +50%", "healing received bonus",1,0.5,3},
			{"{ ?? } 초당 체력-7젠/처치시과치료", "custom",0,1,3},
			--근본
			{"{ U } <렌치>센트리로켓 공속증가", "custom",0,1,4},
			{"{ U } <렌치>센트리 데미지증가", "custom",0,1,3},
			--전투
			{"{ U } <총잡이>데미지 추가증가[1]", "custom",0,1,1},
			{"{ U } <총잡이>총잡이센트리 강화", "custom",0,1,3},
			
			--{"{ SR } 적중 시 죽음의 표식 부착", "mark for death",0,1,1},
			--{"{ SR } 사망에 이르면 텔레포터 출구로 탈출함",}, [[쿨타임 없음]]
		},
		LegendaryAttribute =
		{
			--공용
			{"【 ??! 】 팀킬활성화를 댓가로 센트리고강화", "custom",0,1,1},
			{"【 EP 】 금속없이 건물 건설가능", "building cost reduction",1,-1,0},
			{"【 EP 】 건축대기시간없이 즉시 건설", "build rate bonus",1,-0.99,0.01},
			{"【 EP 】 기계 혁명[태고의 힘]", "custom",0,1,1},
			{"【 ??! 】 받는피해증가/초당 300씩회복", "custom",0,1,1},
			{"【 ??! 】 옭옭쟁이 퐁키[하찮고 소중해]", "custom",0,1,1},
			{"【 ??! 】 같은클처치시공속3중첩/다른클이면초기화", "custom",0,1,1},
			--근본
			{"【 EP 】 <렌치>센트리 고강화", "custom",0,1,1},
			{"【 EP 】 <렌치>엔지니어 은신", "custom",0,1,1},
			{"【 EP 】 <렌치>적중시 적 데미지감소", "custom",0,1,1},
			--전투
			{"【 EP 】 <총잡이>치명타피해량 추가증가", "mult crit dmg",1,0.15,1.15},
			{"【 EP 】 <총잡이>주무기/권총 폭팔성 탄환", "custom",0,1,1},
			{"【 EP 】 <총잡이>헤드샷 활성화/집탄률MAX", "custom",0,1,1},
			{"【 EP 】 <총잡이>부대지원 효과 무시/뎀증", "custom",0,1,1},
			{"【 ??! 】 <총잡이>체력이 적을수록 데미지증가", "custom",0,1,1},
			{"【 ??! 】 <총잡이>체력이 16% 미만일때 치명타공격", "custom",0,1,1},
			{"【 EP 】 <총잡이>적 적중시 절단기 도발효과", "aoe heal chance",0,600,600},
			
			--{"【 SSR 】 처치 시 5초간 치명타 증진", "critboost on kill",0,5,5},
			--{"【 SSR 】 소형 치명타 발생시 크리티컬로 전환", "minicrits become crits",0,1,1},
			--{"【 SSR 】 활성화된 구조물당 피해 저항 +20%",},
		}
	},
	[5] = --Medic Shop
	{
		CommonAttribute =
		{
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"[3속성] 저항력+25%", "custom",1,1,4},
			{"[치명타] 저항력+45%", "dmg taken from crit reduced",1,-0.45,0.1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"우버 충전율 25%증가", "ubercharge rate bonus",1,0.25,1.75},
			{"치료 통달 +1", "healing mastery",0,1,4},
			{"과치료 전문가 +1", "overheal expert",0,1,4},
			{"과치료 유지 시간 35%증가", "overheal decay bonus",1,0.35,1.7},
			{"투사체 보호막", "generate rage on heal",0,1,2},
			{"수통 전문가", "canteen specialist",0,1,3},
			{"무기 전환속도 +20%", "deploy time decreased",1,-0.2,0.2},
			--지원
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			
			--{"근거리 피해 저항력 +30%", "dmg from melee increased",1,-0.3,0.1},
			--{"탄환 피해 저항력 +25%", "dmg taken from bullets reduced",1,-0.25,0.1},
			--{"폭발 피해 저항력 +25%", "dmg taken from blast reduced",1,-0.25,0.1},
			--{"화염 피해 저항력 +25%", "dmg taken from fire reduced",1,-0.25,0.1},
			--{"장탄수 +50%", "clip size bonus",1,0.5},
			--{"test1", "medigun passive attributes",0,"damage force reduction|-2|"},
			--{"test2", "custom",0,1,1},
		},
		RareAttribute =
		{
			{"( R ) 추가 점프 횟수 +1", "air dash count",0,1,1},
			{"( R ) 메디건 사정거리 +50%", "mult medigun range",1,0.5,2},
			{"( R ) 과치료 최대량 +20%", "overheal bonus",1,0.2,1.4},
			{"( R ) 우버차지 지속시간 +2 초", "uber duration bonus",0,2,6},
			{"( R ) 엔지니어 건물 치유가능", "medic machinery beam",0,10,30},
			{"( R ) 모든근접 비타톱 능력 카피", "custom",0,1,1},
			{"( R ) 모든무기도발시 광역힐", "custom",0,1,1},
			{"( R ) 처치 시 소형치료제", "drop health pack on kill",0,1,1},
			--지원
			{"( R ) 치료(물리)[주사기총/십자군쇠뇌 강화]", "custom",0,1,1},
			{"( R ) <십자군>탄환 관통", "projectile penetration",0,1,1},
			{"( R ) <십자군>헤드샷 가능", "can headshot",0,1,1},
			{"( R ) 적 적중시 화염", "custom",0,1,1},
			
			--{"( R ) 적중 시 우버 충전률 +1%", "add uber charge on hit",0,0.01},
			--{"( R ) 환자의 이동속도를 얻음, 메딕과 환자의 이동 속도 +20%",}, [[응조 효과+a]]
		},
		EpicAttribute =
		{
			{"{ U } 치료율 +20%", "heal rate bonus",1,0.2,1.4},
			{"{ U } <예방접종기>활성화된 저항유형 100%저항", "custom",0,1,1},
			{"{ U } I have returned![체력1남기고 부활]", "teleport instead of die",0,1,1},
			{"{ U } <우버톱> 근접 광역공격", "melee cleave attack",0,1,1},
			{"{ U } <차단막> 지속시간 20%증가", "increase buff duration",1,0.2,1.6},
			{"{ U } 우버차지 충전속도 증가", "custom",0,1,1},
			{"{ ?? } 메딕 데미지대폭감소/은폐활성화", "custom",0,1,1},
			{"{ U } 힐 대상자에게 20%데미지증가부여", "custom",0,1,1},
			--우버
			{"{ U } <우버개조/중첩안됨>극강의응급조치", "effect cond override",0,4795690,4795690},
			--지원
			{"{ U } <특성/중첩안됨>적중시 미치광이우유", "custom",0,1,1},
			{"{ U } <특성/중첩안됨>적중시 병수도", "custom",0,1,1},
			{"{ U } 데미지 추가증가[메딕1]", "custom",0,1,1},
			{"{ U } 거대로봇/탱크 추가데미지", "custom",0,1,1,},
			{"{ U } <십자군>반사/파괴 불가", "projectile no deflect",0,1,1},
			{"{ U } <십자군>재장전을 한번에 다 함", "reload full clip at once",0,1,1},
			{"{ U } 적 적중시 적 공속감소", "custom",0,1,1},
			
			--{"{ SR } 적중 시 7초간 이동속도 증진", "speed_boost_on_hit",0,7,7},
			--{"{ SR } 처치 시 2초간 치명타 증진", "critboost on kill",0,2},
		},
		LegendaryAttribute =
		{
			{"【 EP 】 피격시 2초간무적우버 발동확률+20%", "uber on damage taken",0,0.2,0.4},
			{"【 EP 】 체력상관없이 아군 즉시소생", "revive rate",1,100,101},
			{"【 ??! 】 받는피해증가/초당 300씩회복", "custom",0,1,1},
			{"【 ??! 】 옭옭쟁이 퐁키[하찮고 소중해]", "custom",0,1,1},
			{"【 EP 】 아포칼립스[태고의 힘]", "custom",0,1,1},
			--우버
			{"【 EP 】 <우버개조/중첩안됨>고기동우버", "effect cond override",0,72,72},
			{"【 EP 】 <우버개조/중첩안됨>무적+크리", "effect cond override",0,14393,14393},
			{"【 EP 】 <우버개조/중첩안됨>두려워하라", "effect cond override",0,74,74},
			--지원
			{"【 EP 】 데미지 추가증가[메딕2]", "custom",0,1,1},
			{"【 EP 】 치명타피해량 추가증가", "mult crit dmg",1,0.15,1.15},
			{"【 ??! 】 팀킬활성화를 댓가로 적중시 3초치명타", "custom",0,1,1},
			{"【 ??! 】 체력이 적을수록 데미지증가", "custom",0,1,1},
			{"【 ??! 】 프렌지[체력이 16% 미만일때 상시크리]", "custom",0,1,1},
			{"【 EP 】 체력이 16% 미만일때 치명타공격", "aoe heal chance",0,600,600},
			{"【 ??! 】 같은클처치시공속3중첩/다른클이면초기화", "custom",0,1,1},
			
			--{"【 SSR 】 소형 치명타 발생시 크리티컬로 전환", "minicrits become crits",0,1,1},
			--{"【 SSR 】 차단막 너비, 두께 +35%, 피해량 +50%",}, [[그냥 서서 적이랑 붙어도 피해 안 닿는 정도]]
			--{"【 SSR 】 적중 시 화상/우유/자라테 효과 부여", "custom",0,1,1},
		}
	},
	[2] = --Sniper Shop
	{
		CommonAttribute =
		{
			{"피해량 +25%", "damage bonus",1,0.25,2},
			{"재장전 속도 +20%", "faster reload rate",1,-0.2,0.4},
			{"처치 시 체력 25 회복", "heal on kill",0,25,100},
			{"최대체력 +25", "max health additive bonus",0,25,100},
			{"탄약/장탄 50%증가", "custom",1,0.5,3.5},
			{"이동속도 +10%", "move speed bonus",1,0.1},
			{"점프높이 +20%", "increased jump height",1,0.2,1.6},
			{"병수도/레이저백 재충전 속도+15%증가", "effect bar recharge rate increased",1,-0.15,0.4},
			{"[3속성] 저항력+25%", "custom",1,1,4},
			{"[치명타] 저항력+45%", "dmg taken from crit reduced",1,-0.45,0.1},
			{"초당 체력 회복량 +4", "health regen",0,4,20},
			{"5초 마다 최대 탄약의 10% 보급", "ammo regen",0,0.1,1},
			{"적중 시 체력 4 회복", "heal on hit for rapidfire",0,4,8},
			{"무기 전환속도 +20%", "deploy time decreased",1,-0.2,0.2},
			{"적중 시 5 초간 출혈", "bleeding duration",0,5,20},
			--근본
			{"<저격총>충전 속도 +25%", "SRifle Charge rate increased",1,0.25,2},
			--활
			{"<헌츠맨>투사체 비행속도 15%증가", "Projectile speed increased",1,0.15,1.6},
			--SMG
			{"<SMG>SMG공속증가", "custom",0,1,4},
			
			--{"근거리 피해 저항력 +30%", "dmg from melee increased",1,-0.3,0.1},
			--{"탄환 피해 저항력 +25%", "dmg taken from bullets reduced",1,-0.25,0.1},
			--{"폭발 피해 저항력 +25%", "dmg taken from blast reduced",1,-0.25,0.1},
			--{"화염 피해 저항력 +25%", "dmg taken from fire reduced",1,-0.25,0.1},
			--{"활: 도발 상태중 우버차지 발동,}, [[무적 우버]]
			--{"기관단총: 장탄수 +50%", "clip size bonus",1,0.5},
		},
		RareAttribute =
		{
			{"( R ) 추가 점프 횟수 +1", "air dash count",0,1},
			{"( R ) 적 적중시 화염", "custom",0,1,1},
			{"( R ) 병수도 적중시 대상 이동속도 감소", "applies snare effect",1,-0.35,0.65},
			{"( R ) 조준 시 조준선이 흔들리지 않음", "no damage view flinch",0,1,1},
			{"( R ) 처치 시 소형치료제", "drop health pack on kill",0,1,1},
			--근본
			{"( R ) <저격총>저격총 데미지증가", "custom",0,1,1},
			{"( R ) <저격총>헤드샷폭팔 +1증가", "custom",0,1,4},
			--활
			{"( R ) <헌츠맨>활 탄약/체력증가", "custom",0,1,1},
			{"( R ) <헌츠맨>약한화살2개[관통찍으면 ㅈ됨]", "custom",0,1,3},
			{"( R ) <헌츠맨>화살 조종가능", "custom",0,1},
			--SMG
			{"( R ) <SMG>체력증가/헤드샷활성/추뎀", "custom",0,1,1},
			{"( R ) <SMG>관통탄환", "custom",0,1,1},
			{"( R ) <SMG>집탄율MAX", "custom",0,1,1},
			
			--{"( R ) 헤드샷 면역, 헤드샷 피해량 +20%",},[[역저격]]
		},
		EpicAttribute =
		{
			{"{ U } 집중력/젠장/병수도 지속시간+35%", "mult effect duration",1,0.35,1.7},
			{"{ U } 메디건 치료 광선이 연결된 모든 대상 타격", "damage all connected",0,1,1},
			{"{ U } 거대로봇/탱크 추가데미지", "custom",0,1,1,},
			{"{ U } 모든 받는 치료량 +50%", "healing received bonus",1,0.5,2},
			{"{ ?? } 초당 체력-7젠/처치시과치료", "custom",0,1,3},
			--패시브
			{"{ U } <패시브/중첩안됨>적중시 적 이속감소", "custom",0,1,1},
			{"{ U } <패시브/중첩안됨>적중시 적 뎀감소", "custom",0,1,1},
			--근본
			{"{ U } <저격총>저격총 개조", "custom",0,1,2},
			--활
			{"{ U } <헌츠맨>활 데미지증가", "custom",0,1,1},
			--SMG
			{"{ U } <SMG>K15 경기관총", "custom",0,1,1},
			{"{ U } <SMG>SMG 공격속도 추가증가", "custom",0,1,1},
			{"{ U } <SMG>탄환개조", "custom",0,1,1},
			--공유
			{"{ U } <활/SMG>처치시 5초간 이속증진", "speed_boost_on_kill",0,5,5},
			
			--{"{ SR } 전차 대상 피해량 +50%", "mult dmg vs tanks",1,0.5,1.5},
		},
		LegendaryAttribute =
		{
			{"【 ??! 】 체력이 적을수록 데미지증가", "custom",0,1,1},
			{"【 ??! 】 받는피해증가/초당 300씩회복", "custom",0,1,1},
			{"【 ??! 】 팀킬활성화를 댓가로 적중시 3초치명타", "custom",0,1,1},
			{"【 ??! 】 The Lost[방어력 999감소/데미지극대화]", "custom",0,1,1},
			{"【 EP 】 적 적중시 병수도효과", "custom",0,1,1},
			{"【 EP 】 부대지원 효과 무시/데미지증가", "custom",0,1,1},
			{"【 EP 】 황혼의 날개[태고의 힘]", "custom",0,1,1},
			{"【 ??! 】 옭옭쟁이 퐁키[하찮고 소중해]", "custom",0,1,1},
			{"【 ??! 】 체력이 16% 미만일때 치명타공격", "custom",0,1,1},
			{"【 EP 】 적 적중시 절단기 도발효과", "aoe heal chance",0,600,600},
			{"【 ??! 】 같은클처치시공속3중첩/다른클이면초기화", "custom",0,1,1},
			--패시브
			{"【 EP 】 <패시브/중첩안됨>적중시 적 방깎", "custom",0,1,1},
			--근본
			{"【 EP 】 <저격총>저격총게이지 풀차칭시 추뎀", "custom",0,1,1},
			--활
			{"【 EP 】 <헌츠맨>추가메인화살[관통찍으면 ㅈ됨]", "custom",0,1,1},
			{"【 EP 】 <헌츠맨>체력추가증가", "custom",0,1,1},
			{"【 EP 】 <헌츠맨>적 추적화살", "custom",0,1},
			--SMG
			{"【 EP 】 <SMG>SMG 폭팔성 탄환", "custom",0,1,1},
			{"【 EP 】 <SMG>이중사격", "custom",0,1,1},
			--공유
			{"【 ??! 】 <활/저격총>느려터진공속/깡추뎀", "custom",0,1,1},
			{"【 EP 】 <활/저격총>주무기 공속증가", "custom",0,1,1},
			
			--{"【 SSR 】 소형 치명타 발생시 크리티컬로 전환", "minicrits become crits",0,1,1},
			--{"【 SSR 】 모든 받는 치료량 +100%", "healing received bonus",1,1},
			--{"【 SSR 】 앉아있을 시 초당 피해량 10% 증가",}, [[최대 100%, 앉기만 하면 됨]]
			--{"【 SSR 】 적중 시 죽음의 표식 부착", "mark for death",0,1,1},
		}
	},
	[8] = --Spy Shop
	{
		CommonAttribute =
		{
			{"피해량/거대백스텝+25%", "damage bonus",1,0.25,2},
			{"공격 속도 +10%", "fire rate bonus",1,-0.1,0.6},
			{"재장전 속도 +20%", "faster reload rate",1,-0.2,0.4},
			{"탄약/장탄 50%증가", "custom",1,0.5,3.5},
			{"5초 마다 최대 탄약의 10% 보급", "ammo regen",0,0.1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"[3속성] 저항력+25%", "custom",1,1,4},
			{"[치명타] 저항력+45%", "dmg taken from crit reduced",1,-0.45,0.1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			--암살
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			--리볼버
			{"<<중요>>로봇만들기 스타터팩", "custom",0,1,1},
			
			--{"근거리 피해 저항력 +30%", "dmg from melee increased",1,-0.3,0.1},
			--{"탄환 피해 저항력 +25%", "dmg taken from bullets reduced",1,-0.25,0.1},
			--{"폭발 피해 저항력 +25%", "dmg taken from blast reduced",1,-0.25,0.1},
			--{"화염 피해 저항력 +25%", "dmg taken from fire reduced",1,-0.25,0.1},
			--{"장탄수 +50%", "clip size bonus",1,0.5},
			--{"은폐 지속시간 +20%", "cloak consume rate decreased",1,-0.2},
			--{"전자 교란기 재충전 속도 +15%", "charge recharge rate increased",1,0.15}, --안됨
		},
		RareAttribute =
		{
			{"( R ) 처치 시 5초간 이동속도 증진", "speed_boost_on_kill",0,5,5},
			{"( R ) 적 적중시 화염", "custom",0,1,1},
			{"( R ) 처치 시 소형치료제", "drop health pack on kill",0,1,1},
			--암살
			{"( R ) <백스텝>스카웃능력카피/돈수집시과치료", "custom",0,1,1},
			{"( R ) <백스텝>적중 시 은폐 에너지 9%증가", "add cloak on hit",0,9,36},
			{"( R ) <백스텝>적 센트리 탐지불가", "ignored by enemy sentries",0,1,1},
			{"( R ) <백스텝>백스탭 처치 시 변장", "disguise on backstab",0,1,1},
			{"( R ) <백스텝>백스탭/건물 새핑 시 치명타적립", "sapper kills collect crits",0,1,1},
			--리볼버
			{"( R ) <총파이>탄환 관통", "projectile penetration",0,1,1},
			{"( R ) <총파이>데스 바이 리볼버", "custom",0,1,1},
			{"( R ) <총파이>관통탄환 추뎀", "custom",0,1,1,},
			
			--{"( R ) 헤드샷 가능", "can headshot",0,1,1},
			--{"( R ) 은폐 해제 대기 시간 -50%", "mult decloak rate",1,-0.5,0.01},
			--{"( R ) 기절/둔화 면역", "custom",0,1,1},
		},
		EpicAttribute =
		{
			{"{ U } 메디건 치료 광선이 연결된 모든 대상 타격", "damage all connected",0,1,1},
			{"{ U } 모든 받는 치료량 +50%", "healing received bonus",1,0.5,3},
			{"{ U } 거대로봇/탱크 추가데미지", "custom",0,1,1,},
			{"{ U } 데미지 추가증가[스파이1]", "custom",0,1,1},
			{"{ ?? } 초당 체력-7젠/처치시과치료", "custom",0,1,3},
			--암살
			{"{ U } <백스텝>근접무기 사거리 증가", "melee range multiplier",1,0.8,4.2},
			{"{ U } <백스텝>화상/우유/병수도 면역", "custom",0,1,1},
			{"{ U } <백스텝>건물 적중시 10초정지", "disable buildings on hit",0,10,10},
			{"{ U } <백스텝>소형봇적중시 스턴", "custom",0,1,1},
			--리볼버
			{"{ U } <총파이>헤드샷활성/헤폭+1", "custom",0,1,3},
			{"{ U } <총파이>데미지증가/적 공속감소", "custom",0,1,1},
			
			--{"{ SR } 마지막 장탄 항상 치명타", "last shot crits",0,1,1},
			--{"{ SR } 화상 면역", "afterburn immunity",0,1,1},
			--{"{ SR } 전차 대상 피해량 +75%", "mult dmg vs tanks",1,0.75,1.75},
			--{"{ SR } 변장 시 피해량 +200%", "damage bonus while disguised",1,2,3},
		},
		LegendaryAttribute =
		{
			{"【 EP 】 데스 크라이시스[태고의 힘]", "custom",0,1,1},
			{"【 ??! 】 체력이 적을수록 데미지증가", "custom",0,1,1},
			{"【 ??! 】 받는피해증가/초당 300씩회복", "custom",0,1,1},
			{"【 ??! 】 팀킬활성화를 댓가로 적중시 3초치명타", "custom",0,1,1},
			{"【 ??! 】 옭옭쟁이 퐁키[하찮고 소중해]", "custom",0,1,1},
			{"【 ??! 】 체력이 16% 미만일때 치명타공격", "custom",0,1,1},
			{"【 EP 】 적 적중시 절단기 도발효과", "aoe heal chance",0,600,600},
			{"【 ??! 】 같은클처치시공속3중첩/다른클이면초기화", "custom",0,1,1},
			--암살
			{"【 EP 】 <백스텝>은폐시간증가/즉시해제", "custom",0,1,1},
			{"【 EP 】 <백스텝>근접적중시 몇초간무적", "custom",0,1,1},
			{"【 EP 】 <백스텝>75%확률로 적 공격회피", "custom",0,1,1},
			{"【 EP 】 <백스텝>체력 추가증가", "custom",0,1,1},
			--리볼버
			{"【 EP 】 <총파이>리볼버 폭팔성 탄환", "custom",0,1,1},
			{"【 EP 】 <총파이>이중사격", "custom",0,1,1},
			{"【 EP 】 <총파이>치명타피해량 추가증가", "custom",0,1,1},
			{"【 EP 】 <총파이>적중횟수만큼 데미지증가", "custom",0,1,1,},
			
			--{"【 SSR 】 변장시 무적", "disguise damage reduction",1,-1,0},
 			--{"【 SSR 】 모든 받는 치료량 +100%", "healing received bonus",1,1},
			--{"【 SSR 】 리볼버 사격 시 변장 유지", "keep disguise on attack",0,1,1},
		}
	}
}

--Used for returning the class name  [주석 1]
classIndices_Internal = {
    [1] = "스카웃",
    [3] = "솔저",
    [7] = "파이로",
    [4] = "데모맨",
    [6] = "헤비",
    [9] = "엔지니어",
    [5] = "메딕",
    [2] = "스나이퍼",
    [8] = "스파이",
}


--[[This table is essential, it will store the SteamID3 of a player and act as a "save file" for the player,
		Things that are stored in here for each player:
			UpgradePoints - how many upgrade points the player has, persists between classes
			RerollPoints - how many rerolls the player has, persists between classes

			An index from [1] to [9] which will represent the player's class
			Inside the index, each class has its own
				hasRolled - boolean, used as a flag if the player has rolled for upgrades on that class
				PurchasedUpgrades - table, which upgrades have been purchased for that player on that class
				MaxedUpgrades - table, which upgrades are maxed for that player on that class
				UpgradeMenu - table, show a unique upgrade menu for that player on that class
			]]
UniqueAccountIDs = {}

--[[Also very important, this table is akin to an emulator's "save state" where it will copy everything from
	UniqueAccountIDs, TotalUpgradePoints, and TotalRerollPoints. In the case that players lose a wave, this table is used
	to store save states]]
WaveState = {}

--[[Finds all func_upgradestation's on the map and lets the player interact with them for bringing up the menu]]
function EnableUpgradeStations()
	for _, v in pairs(ents.FindAllByClass("func_upgradestation")) do
		v:AddCallback(ON_START_TOUCH,
		function(_,player)
		    if player:IsRealPlayer() then
				RollUpgrades(player)
				ShowUpgradeMenu(player)
				player:Print(2, "로그라이그 모드는 서비스종료다")
			end
		end)
		v:AddCallback(ON_END_TOUCH,
		function(_,player)
		    if player:IsRealPlayer() then
				CloseUpgradeMenu(player) --probably redundnant
				player:Print(2, "사유: 선택해도 넘어가지않음, 수치중첩불가문제")
			end
		end)
	end
end

--[[Adds the OnSpawn callback so that everytime a player spawns their upgrades are reapplied]]
function OnPlayerConnected(player)
    if player:IsRealPlayer() then
        player:AddCallback(ON_SPAWN, function(player)
			InitUserId(player)
			ReAddPurchasedUpgrades(player)
		end)
    end
end

--[[If the player joins the server for the first time, their SteamID3 is added to UniqueAccountIDs
	Note that the function for pruchasing upgrades is stored here]]
function InitUserId(activator)
	local player = (ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]
	if UniqueAccountIDs[player] == nil then
		UniqueAccountIDs[player] =
		{
			UpgradePoints = TotalUpgradePoints,
			RerollPoints = TotalRerollPoints,
		}
	end

	local class = activator:DumpProperties().m_iClass
	if UniqueAccountIDs[player][class] == nil then
		UniqueAccountIDs[player][class] =
		{
			hasRolled = false,
			PurchasedUpgrades = {}, --Stored as key [Upgrade name] with value equal to how many times it was purchased
			MaxedUpgrades = {}, --Used a temporary table, similar to PurchasedUpgrades, probably not needed in style2
			UpgradeMenu =
			{
				timeout = 0,
				title = "Select an upgrade - ",
				itemsPerPage = nil,
				flags = MENUFLAG_BUTTON_EXIT,
				onSelect = function(activator, index, value) --Responsible for subtracting upgrade/reroll points, disabling purchased upgrades
					local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]]
					local class = activator:DumpProperties().m_iClass
					local purchased = player[class].PurchasedUpgrades
					local menu = player[class].UpgradeMenu
					local playername = activator:DumpProperties().m_szNetname[1]

					if value ~= "reroll" then
						if purchased[value] == nil then
							purchased[value] = 1
						else
							purchased[value] = purchased[value] + 1
						end

						menu[index].disabled = true
						AddUpgrade(activator, value)

						local upgradetable = {}
						for i in (string.gmatch(value, "[^,]+")) do
							upgradetable[#upgradetable + 1] = i
						end
						local upgrade = upgradetable[1]

						if string.find(upgrade, "( R )",1,true) then -- 루아 string.sub (참조 문자열,시작 문자열 위치,끝 문자열 위치) \x074B69FF = 색상코드 \x07RRGGBB
							util.PrintToChatAll("\x07ff3d3d"  .. playername .." " .. "\x0700FFFF".. string.sub(upgrade,1,5) .. "\x07FFD700".. string.sub(upgrade,6,#upgrade) .. "\x07fbeccb Level " .. purchased[value] .. "\x07fbeccb 을 구입 하였습니다. ")
						elseif string.find(upgrade, "{ U }",1,true) then
							util.PrintToChatAll("\x07ff3d3d"  .. playername .. " " .. "\x078847FF".. string.sub(upgrade,1,6) .. "\x07FFD700".. string.sub(upgrade,7,#upgrade) .. "\x07fbeccb Level " .. purchased[value] .. "\x07fbeccb 을 구입 하였습니다. ")
						elseif string.find(upgrade, "{ ?? }",1,true) then
							util.PrintToChatAll("\x07ff3d3d"  .. playername .. " " .. "\x07000000".. string.sub(upgrade,1,6) .. "\x07FFD700".. string.sub(upgrade,7,#upgrade) .. "\x07fbeccb Level " .. purchased[value] .. "\x07fbeccb 을 구입 하였습니다. ")
						elseif string.find(upgrade, "【 EP 】",1,true) then
							util.PrintToChatAll("\x07ff3d3d"  .. playername .. " " .. "\x07FF0000".. string.sub(upgrade,1,11) .. "\x07FFD700".. string.sub(upgrade,12,#upgrade) .. "\x07fbeccb Level " .. purchased[value] .. "\x07fbeccb 을 구입 하였습니다. ")
						elseif string.find(upgrade, "【 ??! 】",1,true) then
							util.PrintToChatAll("\x07ff3d3d"  .. playername .. " " .. "\x07000000".. string.sub(upgrade,1,11) .. "\x07FFD700".. string.sub(upgrade,12,#upgrade) .. "\x07fbeccb Level " .. purchased[value] .. "\x07fbeccb 을 구입 하였습니다. ")
						else
						util.PrintToChatAll("\x07ff3d3d"  .. playername .. " "  .. "\x07FFD700" .. upgrade .. "\x07fbeccb Level " .. purchased[value] .. "\x07fbeccb 을 구입 하였습니다. ")
						end

						player.UpgradePoints = player.UpgradePoints - 1

						player[class].hasRolled = false
						RollUpgrades(activator) --after purchasing an upgrade, reroll for new set of upgrades

					else
						RerollUpgrades(activator)
					end

					ShowUpgradeMenu(activator)
				end,
				onCancel = nil
			}
		}
	end
end

--[[Your random number generator, returns a float to allow for decimal probabilities
	In this example, it rolls for rarity first, then rolls a second time to pick an upgrade
	So the probability of a specific upgrade is based on two rng rolls]]
function UpgradeRoulette(activator)
	local number = math.random() --returns float from 0 to 1
	local class = activator:DumpProperties().m_iClass
	local shop = AllShops[class]
	local pool = {}

	if number < 0.80 then
		pool = shop.CommonAttribute
	elseif (number >= 0.80 and number < 0.95) then
		pool = shop.RareAttribute
	elseif (number >= 0.95 and number < 0.99) then
		pool = shop.EpicAttribute
	elseif number >= 0.99 then --probably should be less than 1%
		pool = shop.LegendaryAttribute
	end

	local index = math.random(1,(#pool)) --returns integer from 1 to number of upgrades in pool
	local upgrade = pool[index]

	return upgrade
end

--[[This function calls UpgradeRoulette and sends the chosen upgrades to the upgrade menu]]
function RollUpgrades(activator)
	local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]]
	local class = activator:DumpProperties().m_iClass
	local menu = player[class].UpgradeMenu
	local purchased = player[class].PurchasedUpgrades
	local maxed = player[class].MaxedUpgrades

	if player[class].hasRolled ~= true then
		for index = 1, MenuCapacity, 1 do
			menu[index] = {}
			maxed = {}
		end

		for index = 1, MenuCapacity, 1 do
			local upgrade = UpgradeRoulette(activator)
			local upgradestring = table.concat(upgrade,",")

			--[[Used to prevent maxed out upgrades from reappearing in the shop
				Note that this is possibly bugged in style2, will fix later]]
			function CheckMaxed(upgrade)
				local min = upgrade[3]
				local increment = upgrade[4]
				local max = upgrade[5]
				if max ~= nil then
					if maxed[upgradestring] == nil then
						if purchased[upgradestring] == nil then
							maxed[upgradestring] = 0
						else
							maxed[upgradestring] = purchased[upgradestring]
						end
					else
						maxed[upgradestring] = maxed[upgradestring] + 1
					end
					local value = min + maxed[upgradestring] * increment
					if increment > 0 then
						return (tostring(value) >= tostring(max))  --floating point issue
					else
						return (tostring(value) <= tostring(max))
					end
				end
			end

			if CheckMaxed(upgrade) == true then --If upgrade is maxed, reroll
				while CheckMaxed(upgrade) == true do
					upgrade = UpgradeRoulette(activator)
				end
			end

			for i = 1, MenuCapacity, 1 do --If upgrade is duplicate, reroll
				if menu[i].text == upgrade[1] then
					while menu[i].text == upgrade[1] do
						upgrade = UpgradeRoulette(activator)
					end
				end
			end

			menu[index] = {text = upgrade[1], value = table.concat(upgrade,","), disabled = false} --value can't accept tables, only strings/numbers
		end
		player[class].hasRolled = true
	end
end

--Called when the reroll option is selected, subtracts a reroll point
function RerollUpgrades(activator)
	local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]]
	local class = activator:DumpProperties().m_iClass

	player.RerollPoints = player.RerollPoints - 1
	player[class].hasRolled = false
	RollUpgrades(activator)
end

--Sets hasRolled to false for all players in the game, usually called on wave end
function ResetRolls()
	for _, v in pairs(UniqueAccountIDs) do
		for i = 1, 9, 1 do
			if v[i] ~= nil then
				v[i].hasRolled = false
			end
		end
	end
end

--[[Apply upgrades to players
	using "custom" allows you do anything you define in the function as an upgrade
	meaning PointTemplate upgrades are possible]]
function AddUpgrade(activator, value)
	local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]]
	local class = activator:DumpProperties().m_iClass
	local purchased = player[class].PurchasedUpgrades
	local upgradetable = {}

	for i in string.gmatch(value, "[^,]+") do
		upgradetable[#upgradetable + 1] = i
	end
	local upgrade = upgradetable[1]
	local attributename = upgradetable[2]
	local min = tonumber(upgradetable[3])
	local increment = tonumber(upgradetable[4])
	local max = tonumber(upgradetable[5])

	if attributename == "custom" then
		if upgrade == "모든탄약 50%증가" then
			activator:SetAttributeValue("maxammo primary increased",min+increment*purchased[value])
			activator:SetAttributeValue("maxammo secondary increased",min+increment*purchased[value])
			activator:SetAttributeValue("maxammo grenades1 increased",min+increment*2*purchased[value])
		elseif upgrade == "탄약/장탄 50%증가" then
			activator:SetAttributeValue("maxammo primary increased",min+increment*purchased[value])
			activator:SetAttributeValue("maxammo secondary increased",min+increment*purchased[value])
			activator:SetAttributeValue("clip size bonus",min+increment*purchased[value])
			activator:SetAttributeValue("maxammo grenades1 increased",min+increment*2*purchased[value])
			activator:SetAttributeValue("maxammo grenades1 increased",min+increment*2*purchased[value])
		--elseif upgrade == "( R ) 기절/둔화 면역" then
			--activator:SetAttributeValue("mult stun resistance",-1)
		elseif upgrade == "[3속성] 저항력+25%" then
			activator:SetAttributeValue("dmg taken from blast reduced",math.max(1+(-0.75*purchased[value]),0.25))
			activator:SetAttributeValue("dmg taken from fire reduced",math.max(1+(-0.75*purchased[value]),0.25))
			activator:SetAttributeValue("dmg taken from bullets reduced",math.max(1+(-0.75*purchased[value]),0.25))
		elseif upgrade == "3 속성 저항 +30%" then
			activator:SetAttributeValue("dmg taken from blast reduced",math.max(1+(-0.3*purchased[value]),0.1))
			activator:SetAttributeValue("dmg taken from fire reduced",math.max(1+(-0.3*purchased[value]),0.1))
			activator:SetAttributeValue("dmg taken from bullets reduced",math.max(1+(-0.3*purchased[value]),0.1))
		elseif upgrade == "3 속성 저항 +45%" then
			activator:SetAttributeValue("dmg taken from blast reduced",math.max(1+(-0.45*purchased[value]),0.1))
			activator:SetAttributeValue("dmg taken from fire reduced",math.max(1+(-0.45*purchased[value]),0.1))
			activator:SetAttributeValue("dmg taken from bullets reduced",math.max(1+(-0.45*purchased[value]),0.1))
		elseif upgrade == "( R ) 적 적중시 화염" then
			activator:SetAttributeValue("Set DamageType Ignite",1)
		elseif upgrade == "{ U } 거대로봇/탱크 추가데미지" then
			activator:SetAttributeValue("mult dmg vs giants",1.2)
			activator:SetAttributeValue("mult dmg vs tanks",1.2)
		elseif upgrade == "{ ?? } 초당 체력-7젠/처치시과치료" then
			activator:SetAttributeValue("restore health on kill",math.min(0+(25*purchased[value]),75))
			activator:SetAttributeValue("health drain",math.min(0+(-7*purchased[value]),-7))
		elseif upgrade == "【 ??! 】 같은클처치시공속3중첩/다른클이면초기화" then
			activator:SetAttributeValue("kill combo fire rate boost",0.07)
		elseif upgrade == "【 EP 】 진각성: 연단된 칼날[태고의 힘]" then
			activator:SetAttributeValue("fire rate penalty HIDDEN",math.min(1+(-0.15*purchased[value]),0.85))
			activator:SetAttributeValue("reload time increased HIDDEN",math.min(1+(-0.25*purchased[value]),0.75))
			activator:SetAttributeValue("turn to gold",1)
			activator:SetAttributeValue("sniper fires tracer",1)
			activator:SetAttributeValue("projectile trail particle","eyeboss_projectile")
		elseif upgrade == "【 EP 】 적 적중시 미치광이우유효과" then
			activator:SetAttributeValue("add cond on hit",27)
		elseif upgrade == "【 EP 】 적 적중시 병수도효과" then
			activator:SetAttributeValue("add cond on hit",24)
		elseif upgrade == "【 ??! 】 The Lost[방어력 999감소/데미지극대화]" then
			activator:SetAttributeValue("damage bonus HIDDEN",2.5)
			activator:SetAttributeValue("dmg taken increased",999)
			activator:SetAttributeValue("canteen specialist",-8)
		elseif upgrade == "【 ??! 】 체력이 적을수록 데미지증가" then
			activator:SetAttributeValue("mult dmg with reduced health",2.5)
		elseif upgrade == "【 ??! 】 받는피해증가/초당 300씩회복" then
			activator:SetAttributeValue("CARD: health regen",300)
			activator:SetAttributeValue("dmg taken from fire increased",math.max(1+(0.3*purchased[value]),1.3))
			activator:SetAttributeValue("dmg taken from blast increased",math.max(1+(0.3*purchased[value]),1.3))
			activator:SetAttributeValue("dmg taken from bullets increased",math.max(1+(0.3*purchased[value]),1.3))
			activator:SetAttributeValue("dmg taken from crit increased",math.max(1+(0.3*purchased[value]),1.3))
			activator:SetAttributeValue("dmg from melee increased",math.max(1+(0.3*purchased[value]),1.3))
		elseif upgrade == "【 ??! 】 팀킬활성화를 댓가로 적중시 3초치명타" then
			activator:SetAttributeValue("crits on damage",600)
			activator:SetAttributeValue("receive friendly fire",1)
			activator:SetAttributeValue("allow friendly fire",1)
		elseif upgrade == "【 ??! 】 옭옭쟁이 퐁키[하찮고 소중해]" then
			activator:SetAttributeValue("model scale",0.25)
		elseif upgrade == "【 ??! 】 체력이 16% 미만일때 치명타공격" then
			activator:SetAttributeValue("mult crit when health is below percent",0.16)
		elseif upgrade == "컨슘" then
			activator:SetAttributeValue("critboost on kill",1)
		elseif upgrade == "데미지1" then
            activator:SetAttributeValue("damage bonus HIDDEN",2)
		elseif upgrade == "데미지2" then
            activator:SetAttributeValue("CARD: damage bonus",2)
		elseif upgrade == "데미지3" then
            activator:SetAttributeValue("dmg penalty vs players",2)
		elseif upgrade == "데미지4" then
            activator:SetAttributeValue("damage bonus",2)
		elseif upgrade == "데미지5" then
            activator:SetAttributeValue("damage penalty",2)
        elseif upgrade == "데미지(거대/탱크)" then
            activator:SetAttributeValue("mult dmg vs giants",2)
			activator:SetAttributeValue("mult dmg vs tanks",2)
		elseif upgrade == "주사기탄 아카이브" then
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("override projectile type",11)
			activator:SetAttributeValue("fire rate penalty HIDDEN",math.min(1+(0.55*purchased[value]),1.55))
			activator:SetAttributeValue("projectile no deflect",1)
			activator:SetAttributeValue("projectile acceleration start time",0)
			activator:SetAttributeValue("projectile acceleration",25000)
			activator:SetAttributeValue("mult projectile count",2)
			activator:SetAttributeValue("projectile spread angle penalty",1)
			activator:SetAttributeValue("dmg penalty vs players",5.1)
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("mult smack time",10)
		elseif upgrade == "( R ) 총잡이업글 아카이브" then
			activator:SetAttributeValue("damage bonus HIDDEN",1.15)
			activator:SetAttributeValue("reload full clip at once",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_pistol_scout")
			activator:SetAttributeValue("sentry rocket weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("max health additive penalty",25)
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("build rate bonus",0.45)
			activator:SetAttributeValue("upgrade rate decrease",4)
		elseif upgrade == "<<중요>>로봇만들기 스타터팩" then
            activator:SetAttributeValue("move speed bonus",20)
			activator:SetAttributeValue("air dash count",33)
            activator:SetAttributeValue("max health additive penalty",5000)
			activator:SetAttributeValue("restore health on kill",75)
			activator:SetAttributeValue("damage force reduction",0.01)
			activator:SetAttributeValue("ammo regen",10)
			activator:SetAttributeValue("mult dmg vs tanks",10)
			activator:SetAttributeValue("mod see enemy health",1)
			activator:SetAttributeValue("always allow taunt",1)
			
		--스카웃(식칼)
		elseif upgrade == "【 ??! 】 <더 컴퍼니X>식칼: Nuclear Weapon" then
			activator:SetAttributeValue("fire rate penalty HIDDEN",14.2)
			activator:SetAttributeValue("clip size penalty",-30)
			activator:SetAttributeValue("maxammo primary reduced",-30)
			activator:SetAttributeValue("maxammo secondary reduced",-30)
			activator:SetAttributeValue("max health additive penalty",-115)
			activator:SetAttributeValue("Blast radius decreased",6.5)
			activator:SetAttributeValue("use large smoke explosion",1)
			activator:SetAttributeValue("mult projectile count",1)
			activator:SetAttributeValue("projectile spread angle penalty",0)
			activator:SetAttributeValue("override projectile type",2)
			activator:SetAttributeValue("override projectile type extra","")
			activator:SetAttributeValue("projectile gravity",600)
			activator:SetAttributeValue("damage bonus HIDDEN",95)
			activator:SetAttributeValue("dmg taken from self reduced",111)
			activator:SetAttributeValue("mult smack time",10)
			activator:SetAttributeValue("hit self on miss",1)
			activator:SetAttributeValue("Projectile speed increased",1)
			activator:SetAttributeValue("mod projectile heat no predict target speed",0)
			activator:SetAttributeValue("mod projectile heat seek power",0)
			activator:SetAttributeValue("mod projectile heat aim error",0)
			activator:SetAttributeValue("mod projectile heat aim time",0)
			activator:SetAttributeValue("projectile lifetime",25)
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("projectile penetration",0)
			activator:SetAttributeValue("arrow target bounce speed",0)
			activator:SetAttributeValue("reset arrow hits on bounce",0)
			activator:SetAttributeValue("projectile no deflect",1)
		elseif upgrade == "【 ??! 】 <더 컴퍼니X>식칼: 메테오 샤워" then
			activator:SetAttributeValue("fire rate penalty HIDDEN",7)
			activator:SetAttributeValue("clip size penalty",-30)
			activator:SetAttributeValue("maxammo primary reduced",-30)
			activator:SetAttributeValue("maxammo secondary reduced",-30)
			activator:SetAttributeValue("max health additive penalty",-105)
			activator:SetAttributeValue("Blast radius decreased",0)
			activator:SetAttributeValue("use large smoke explosion",0)
			activator:SetAttributeValue("mult projectile count",1)
			activator:SetAttributeValue("projectile spread angle penalty",0)
			activator:SetAttributeValue("override projectile type",0)
			activator:SetAttributeValue("override projectile type extra","spellmeteorshower")
			activator:SetAttributeValue("projectile gravity",600)
			activator:SetAttributeValue("damage bonus HIDDEN",2.2)
			activator:SetAttributeValue("dmg taken from self reduced",1)
			activator:SetAttributeValue("mult smack time",1)
			activator:SetAttributeValue("hit self on miss",0)
			activator:SetAttributeValue("Projectile speed increased",7)
			activator:SetAttributeValue("mod projectile heat no predict target speed",0)
			activator:SetAttributeValue("mod projectile heat seek power",0)
			activator:SetAttributeValue("mod projectile heat aim error",0)
			activator:SetAttributeValue("mod projectile heat aim time",0)
			activator:SetAttributeValue("projectile lifetime",25)
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("projectile penetration",0)
			activator:SetAttributeValue("arrow target bounce speed",0)
			activator:SetAttributeValue("reset arrow hits on bounce",0)
			activator:SetAttributeValue("projectile no deflect",1)
		elseif upgrade == "【 ??! 】 <더 컴퍼니X>식칼: 무한추척화살" then
			activator:SetAttributeValue("fire rate penalty HIDDEN",6)
			activator:SetAttributeValue("clip size penalty",-30)
			activator:SetAttributeValue("maxammo primary reduced",-30)
			activator:SetAttributeValue("maxammo secondary reduced",-30)
			activator:SetAttributeValue("max health additive penalty",-105)
			activator:SetAttributeValue("Blast radius decreased",0)
			activator:SetAttributeValue("use large smoke explosion",0)
			activator:SetAttributeValue("mult projectile count",10)
			activator:SetAttributeValue("projectile spread angle penalty",20)
			activator:SetAttributeValue("override projectile type",8)
			activator:SetAttributeValue("override projectile type extra","")
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("damage bonus HIDDEN",1.55)
			activator:SetAttributeValue("dmg taken from self reduced",1)
			activator:SetAttributeValue("mult smack time",0.1)
			activator:SetAttributeValue("hit self on miss",0)
			activator:SetAttributeValue("Projectile speed increased",0.09)
			activator:SetAttributeValue("mod projectile heat no predict target speed",1)
			activator:SetAttributeValue("mod projectile heat seek power",1000)
			activator:SetAttributeValue("mod projectile heat aim error",0)
			activator:SetAttributeValue("mod projectile heat aim time",100)
			activator:SetAttributeValue("projectile lifetime",6)
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("projectile penetration",1)
			activator:SetAttributeValue("arrow target bounce speed",1)
			activator:SetAttributeValue("reset arrow hits on bounce",1)
			activator:SetAttributeValue("projectile no deflect",1)
		--근본
		elseif upgrade == "( R ) 전투스카웃 특화[폭팔탄]" then
			activator:SetAttributeValue("explosive bullets",70)
			activator:SetAttributeValue("add damage per target",0.2)
			activator:SetAttributeValue("explosion particle","rd_robot_explosion_smoke_linger")
		elseif upgrade == "{ U } <식칼금지>사거리별 뎀감없음" then
			activator:SetAttributeValue("no damage falloff",1)
		elseif upgrade == "【 EP 】 공격속도 감소/데미지 극대화" then
			activator:SetAttributeValue("dmg penalty vs players",3.6)
			activator:SetAttributeValue("fire rate penalty",5.5)
		elseif upgrade == "【 EP 】 <식칼금지>더 컴퍼니[태고의 힘]" then
			activator:SetAttributeValue("model scale",1.62)
			activator:SetAttributeValue("mult max health",6)
			activator:SetAttributeValue("damage bonus HIDDEN",1.2)
			activator:SetAttributeValue("is miniboss",1)
			activator:SetAttributeValue("major move speed bonus",0.65)
			activator:SetAttributeValue("damage force reduction",0.01)
			activator:SetAttributeValue("turn to gold",1)
			activator:SetAttributeValue("sniper fires tracer",1)
			activator:SetAttributeValue("projectile trail particle","eyeboss_projectile")
		elseif upgrade == "【 EP 】 데미지 추가증가[스카웃1]" then
            activator:SetAttributeValue("damage penalty",1.2)
        elseif upgrade == "【 EP 】 헤드샷 활성화/집탄률MAX" then
			activator:SetAttributeValue("can headshot",1)
			activator:SetAttributeValue("weapon spread bonus",0)
        elseif upgrade == "【 EP 】 데미지 추가증가[스카웃2]" then
            activator:SetAttributeValue("CARD: damage bonus",1.2)
        elseif upgrade == "【 EP 】 적 처치시 은폐[단 적중시 은폐해제]" then
            activator:SetAttributeValue("add cond when active",66)
            activator:SetAttributeValue("self add attributes on hit","add cond when active|0|0|")
            activator:SetAttributeValue("add attributes on kill","add cond when active|66|444|")
        elseif upgrade == "【 EP 】 적 적중시 공격속도감소효과" then
            activator:SetAttributeValue("add attributes on hit","fire rate penalty HIDDEN|2|3.5|")
        elseif upgrade == "【 EP 】 <식칼금지>버스트 파이어[빠른사격]" then
			activator:SetAttributeValue("burst fire count",1)
			activator:SetAttributeValue("burst fire rate mult",0.4)
			
		--솔저(근본)
		elseif upgrade == "( R ) <로켓전용/중첩안됨>부메랑로켓" then
			activator:SetAttributeValue("mod projectile heat follow crosshair",0)
			activator:SetAttributeValue("mod projectile heat seek power",0)
			activator:SetAttributeValue("mod projectile heat aim error",0)
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("projectile acceleration",-350)
			activator:SetAttributeValue("projectile penetration",1)
			activator:SetAttributeValue("arrow snap to next target radius",1500)
			activator:SetAttributeValue("grenade bounce speed",1)
			activator:SetAttributeValue("arrow target bounce speed",250)
		elseif upgrade == "( R ) <로켓전용/중첩안됨>곡사로켓[중력로켓]" then
			activator:SetAttributeValue("mod projectile heat follow crosshair",0)
			activator:SetAttributeValue("mod projectile heat seek power",0)
			activator:SetAttributeValue("mod projectile heat aim error",0)
			activator:SetAttributeValue("projectile gravity",700)
			activator:SetAttributeValue("projectile acceleration",0)
			activator:SetAttributeValue("projectile penetration",0)
			activator:SetAttributeValue("arrow snap to next target radius",0)
			activator:SetAttributeValue("grenade bounce speed",0)
			activator:SetAttributeValue("arrow target bounce speed",0)
		elseif upgrade == "{ U } <로켓전용/중첩안됨>로켓 조종가능" then
			activator:SetAttributeValue("mod projectile heat follow crosshair",1)
			activator:SetAttributeValue("mod projectile heat aim start time",0)
			activator:SetAttributeValue("mod projectile heat seek power",540)
			activator:SetAttributeValue("mod projectile heat aim error",1)
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("projectile acceleration",4444)
			activator:SetAttributeValue("projectile penetration",0)
			activator:SetAttributeValue("arrow snap to next target radius",0)
			activator:SetAttributeValue("grenade bounce speed",0)
			activator:SetAttributeValue("arrow target bounce speed",0)
		elseif upgrade == "{ U } <로켓전용/중첩안됨>직격포 '500배'" then
			activator:SetAttributeValue("mod projectile heat follow crosshair",0)
			activator:SetAttributeValue("mod projectile heat aim start time",0)
			activator:SetAttributeValue("mod projectile heat seek power",0)
			activator:SetAttributeValue("mod projectile heat aim error",0)
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("projectile acceleration",1000000)
			activator:SetAttributeValue("projectile penetration",0)
			activator:SetAttributeValue("arrow snap to next target radius",0)
			activator:SetAttributeValue("grenade bounce speed",0)
			activator:SetAttributeValue("arrow target bounce speed",0)
		elseif upgrade == "{ U } 로켓투사체 +2증가/데미지 감소" then
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("mult projectile count",math.min(1+(2*purchased[value]),9))
			activator:SetAttributeValue("projectile spread angle penalty",math.min(0+(1*purchased[value]),4))
			activator:SetAttributeValue("dmg penalty vs players",math.min(1+(-0.15*purchased[value]),0.4))
			activator:SetAttributeValue("fire rate penalty",math.min(1+(0.11*purchased[value]),1.44))
		elseif upgrade == "{ U } <로켓전용>데미지 추가증가" then
			activator:SetAttributeValue("damage penalty",1.2)
		elseif upgrade == "{ U } <로켓전용>하늘을 나는 솔저" then
			activator:SetAttributeValue("add cond when active",107)
			activator:SetAttributeValue("move speed penalty",6.5)
			activator:SetAttributeValue("hit self on miss",1)
			activator:SetAttributeValue("maxammo secondary reduced",-40)
		elseif upgrade == "【 EP 】 <로켓전용/중첩안됨>적 추적로켓" then
			activator:SetAttributeValue("mod projectile heat seek power",270)
			activator:SetAttributeValue("mod projectile heat aim error",90)
			activator:SetAttributeValue("mod projectile heat follow crosshair",0)
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("projectile acceleration",0)
			ctivator:SetAttributeValue("projectile penetration",0)
			activator:SetAttributeValue("arrow snap to next target radius",0)
			activator:SetAttributeValue("grenade bounce speed",0)
			activator:SetAttributeValue("arrow target bounce speed",0)
		elseif upgrade == "【 EP 】 로켓발사기 폭팔범위 대폭증가" then
			activator:SetAttributeValue("Blast radius decreased",math.min(1+(1.8*purchased[value]),2.8))
		elseif upgrade == "【 EP 】 <거지포>한번에 발사" then
			activator:SetAttributeValue("burst fire count",1)
			activator:SetAttributeValue("burst fire rate mult",0.02)
		elseif upgrade == "【 EP 】 스탠바이-레디[깃발 활성화시 공속증]" then
			activator:SetAttributeValue("effect add attributes","mul nonrocketjump attackrate|0.75|")
		--(샷건)
		elseif upgrade == "<샷건>샷건을 거주카처럼 개조" then
			activator:SetAttributeValue("override projectile type",1)
			activator:SetAttributeValue("auto fires full clip",1)
			activator:SetAttributeValue("fire full clip at once",1)
			activator:SetAttributeValue("clip size penalty",0.5)
			activator:SetAttributeValue("maxammo secondary reduced",1.5)
			activator:SetAttributeValue("move speed penalty",1.3)
			activator:SetAttributeValue("max health additive penalty",100)
		elseif upgrade == "{ U } <샷건>샷건데미지 추가증가" then
			activator:SetAttributeValue("override projectile type",1)
			activator:SetAttributeValue("damage penalty",1.2)
		elseif upgrade == "{ U } <샷건>샷건:부대지원 효과 무시" then
			activator:SetAttributeValue("override projectile type",1)
			activator:SetAttributeValue("dmg pierces resists absorbs",1)
		elseif upgrade == "【 EP 】 <샷건>샷건으로 적 적중시 공속감소" then
			activator:SetAttributeValue("override projectile type",1)
			activator:SetAttributeValue("add attributes on hit","fire rate penalty HIDDEN|1.8|3|")
		elseif upgrade == "【 EP 】 <샷건>헤드샷 활성화/집탄률MAX" then
			activator:SetAttributeValue("override projectile type",1)
			activator:SetAttributeValue("can headshot",1)
			activator:SetAttributeValue("weapon spread bonus",0)
		--(솔무라이)
		elseif upgrade == "<사무라이>체력증가/추가데미지" then
		    activator:SetAttributeValue("override projectile type",1)
		    activator:SetAttributeValue("clip size penalty",-40)
			activator:SetAttributeValue("maxammo primary reduced",-40)
			activator:SetAttributeValue("maxammo secondary reduced",-40)
			activator:SetAttributeValue("max health additive penalty",200)
			activator:SetAttributeValue("damage penalty",1.4)
			activator:SetAttributeValue("mult credit collect range",8)
			activator:SetAttributeValue("air dash count",10)
		elseif upgrade == "( R ) <사무라이>반맹인특화/사거리증가" then
		    activator:SetAttributeValue("override projectile type",1)
		    activator:SetAttributeValue("clip size penalty",-40)
			activator:SetAttributeValue("maxammo primary reduced",-40)
			activator:SetAttributeValue("maxammo secondary reduced",-40)
			activator:SetAttributeValue("melee cleave attack",1)
			activator:SetAttributeValue("melee range multiplier",9)
			activator:SetAttributeValue("melee bounds multiplier",0.75)
		elseif upgrade == "{ U } <사무라이>솔무라이 이속강화" then
		    activator:SetAttributeValue("override projectile type",1)
		    activator:SetAttributeValue("clip size penalty",-40)
			activator:SetAttributeValue("maxammo primary reduced",-40)
			activator:SetAttributeValue("maxammo secondary reduced",-40)
			activator:SetAttributeValue("move speed penalty",1.6)
			activator:SetAttributeValue("move speed as health decreases",2)
		elseif upgrade == "{ U } <사무라이>적 피해량감소 디버프" then
		    activator:SetAttributeValue("override projectile type",1)
			activator:SetAttributeValue("clip size penalty",-40)
			activator:SetAttributeValue("maxammo primary reduced",-40)
			activator:SetAttributeValue("maxammo secondary reduced",-40)
			activator:SetAttributeValue("add attributes on hit","CARD: damage bonus|0.7|3|")
		elseif upgrade == "【 EP 】 <사무라이>반맹인 공속증가" then
		    activator:SetAttributeValue("override projectile type",1)
		    activator:SetAttributeValue("clip size penalty",-40)
			activator:SetAttributeValue("maxammo primary reduced",-40)
			activator:SetAttributeValue("maxammo secondary reduced",-40)
			activator:SetAttributeValue("fire rate penalty",math.min(1+(-0.2*purchased[value]),0.8))
		--(공용)
		elseif upgrade == "( R ) 로켓 특화/탄환 관통" then
			activator:SetAttributeValue("rocket specialist",1*purchased[value])
			activator:SetAttributeValue("projectile penetration",1)
		elseif upgrade == "【 EP 】 데미지 추가증가[솔저1]" then
            activator:SetAttributeValue("CARD: damage bonus",1.25)
        elseif upgrade == "【 ??! 】 거대화/체력증가[로켓점프 불가능]" then
			activator:SetAttributeValue("model scale",1.62)
			activator:SetAttributeValue("rocket jump damage reduction",1000)
			activator:SetAttributeValue("is miniboss",1)
			activator:SetAttributeValue("mult max health",5.5)
			activator:SetAttributeValue("move speed penalty",0.55)
			activator:SetAttributeValue("patient overheal penalty",0.5)
			
		--파이로(주무기)
		elseif upgrade == "【 EP 】 데미지 추가증가[파이로1]" then
            activator:SetAttributeValue("damage penalty",1.3)
		elseif upgrade == "【 EP 】 불의 숨이 멎을때가 왔다[태고의 힘]" then
			activator:SetAttributeValue("model scale",1.62)
			activator:SetAttributeValue("is miniboss",1)
			activator:SetAttributeValue("mult max health",5.43)
			activator:SetAttributeValue("move speed penalty",0.55)
			activator:SetAttributeValue("patient overheal penalty",0.5)
			activator:SetAttributeValue("CARD: damage bonus",1.2)
			activator:SetAttributeValue("turn to gold",1)
			activator:SetAttributeValue("projectile trail particle","eyeboss_projectile")
		elseif upgrade == "【 EP 】 데미지 추가증가[파이로2]" then
			activator:SetAttributeValue("damage bonus HIDDEN",1.3)
		elseif upgrade == "【 EP 】 데미지 추가증가[파이로3]" then
			activator:SetAttributeValue("dmg penalty vs players",1.3)
		elseif upgrade == "【 EP 】 <플로지>필요게이지감소/지속시간증가" then
			activator:SetAttributeValue("mod rage on hit bonus",1)
			activator:SetAttributeValue("gesture speed increase",1.8)
			activator:SetAttributeValue("increase buff duration",1.65)
		--(패시브)
		elseif upgrade == "【 EP 】 <화방/중첩안됨>화상 다단히트 강화" then
			activator:SetAttributeValue("weapon burn time increased",5)
			activator:SetAttributeValue("weapon burn dmg reduced",1)
			activator:SetAttributeValue("bleeding duration",0)
			activator:SetAttributeValue("stun on damage",0)
			activator:SetAttributeValue("set turn to ice",0)
			activator:SetAttributeValue("add attributes on hit","")
		elseif upgrade == "【 EP 】 <화방/중첩안됨>적 이속감소/소형봇스턴" then
			activator:SetAttributeValue("weapon burn time increased",0.5)
			activator:SetAttributeValue("weapon burn dmg reduced",-999)
			activator:SetAttributeValue("bleeding duration",0)
			activator:SetAttributeValue("stun on damage",100)
			activator:SetAttributeValue("set turn to ice",1)
			activator:SetAttributeValue("add attributes on hit","move speed penalty|0.28|0.55|")
		elseif upgrade == "【 EP 】 <화방/중첩안됨>적 공속감소 디버프효과" then
			activator:SetAttributeValue("weapon burn time increased",1)
			activator:SetAttributeValue("weapon burn dmg reduced",-999)
			activator:SetAttributeValue("bleeding duration",4)
			activator:SetAttributeValue("stun on damage",0)
			activator:SetAttributeValue("set turn to ice",0)
			activator:SetAttributeValue("add attributes on hit","fire rate penalty HIDDEN|2|3.5|")
		--(조명탄)
		elseif upgrade == "( R ) <조명탄/중첩안됨>텔레포터 탄환" then
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("mult projectile count",1)
			activator:SetAttributeValue("projectile spread angle penalty",0)
			activator:SetAttributeValue("override projectile type extra","spelltransposeteleport")
			activator:SetAttributeValue("fire rate penalty HIDDEN",1.5)
			activator:SetAttributeValue("reload time increased HIDDEN",2.7)
			activator:SetAttributeValue("maxammo secondary reduced",0.4)
			activator:SetAttributeValue("Projectile speed increased",99999)
			activator:SetAttributeValue("gesture speed increase",1.8)
		elseif upgrade == "{ U } <조명탄/중첩안됨>가스패서 3개투척" then
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("mult projectile count",3)
			activator:SetAttributeValue("projectile spread angle penalty",6.5)
			activator:SetAttributeValue("override projectile type extra","gas")
			activator:SetAttributeValue("fire rate penalty HIDDEN",2.6)
			activator:SetAttributeValue("reload time increased HIDDEN",5)
			activator:SetAttributeValue("maxammo secondary reduced",0.25)
			activator:SetAttributeValue("Projectile speed increased",5)
			activator:SetAttributeValue("gesture speed increase",1.8)
		elseif upgrade == "【 EP 】 <조명탄/중첩안됨>테슬라 볼트" then
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("mult projectile count",1)
			activator:SetAttributeValue("projectile spread angle penalty",0)
			activator:SetAttributeValue("override projectile type extra","spelllightningorb")
			activator:SetAttributeValue("fire rate penalty HIDDEN",5.3)
			activator:SetAttributeValue("reload time increased HIDDEN",7.3)
			activator:SetAttributeValue("maxammo secondary reduced",0.15)
			activator:SetAttributeValue("Projectile speed increased",0.77)
			activator:SetAttributeValue("gesture speed increase",1.8)
		elseif upgrade == "【 EP 】 <조명탄/중첩안됨>메테오 샤워" then
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("mult projectile count",2)
			activator:SetAttributeValue("projectile spread angle penalty",8)
			activator:SetAttributeValue("override projectile type extra","spellmeteorshower")
			activator:SetAttributeValue("fire rate penalty HIDDEN",5.7)
			activator:SetAttributeValue("reload time increased HIDDEN",7.7)
			activator:SetAttributeValue("maxammo secondary reduced",0.15)
			activator:SetAttributeValue("Projectile speed increased",6)
			activator:SetAttributeValue("gesture speed increase",1.8)
		elseif upgrade == "【 EP 】 <조명탄/중첩안됨>모노큘러스 소환" then
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("mult projectile count",10)
			activator:SetAttributeValue("projectile spread angle penalty",18)
			activator:SetAttributeValue("override projectile type extra","spellspawnboss")
			activator:SetAttributeValue("fire rate penalty HIDDEN",10)
			activator:SetAttributeValue("reload time increased HIDDEN",13.5)
			activator:SetAttributeValue("maxammo secondary reduced",0.15)
			activator:SetAttributeValue("Projectile speed increased",10)
			activator:SetAttributeValue("gesture speed increase",1.8)
		--elseif upgrade == "【 SSR 】 화염수명+500%" then
			--activator:SetAttributeValue("weapon burn dmg increased",7)
			--activator:SetAttributeValue("flame_lifetime",6)
			--activator:SetAttributeValue("flame_up_speed",-100)
			--activator:SetAttributeValue("flame_ignore_player_velocity",1)
			
		--데모맨(흑기사)
		elseif upgrade == "( R ) <흑기사>근접 범위공격" then
			activator:SetAttributeValue("Reload time increased",66)
			activator:SetAttributeValue("melee cleave attack",1)
			activator:SetAttributeValue("move speed as health decreases",3)
		elseif upgrade == "( R ) <흑기사>너비/사거리 증가" then
			activator:SetAttributeValue("Reload time increased",66)
			activator:SetAttributeValue("melee bounds multiplier",math.min(1+(0.45*purchased[value]),5.05))
			activator:SetAttributeValue("melee range multiplier",math.min(1+(0.37*purchased[value]),4.33))
		elseif upgrade == "{ U } <흑기사>방패 충돌피해9배" then
			activator:SetAttributeValue("Reload time increased",66)
			activator:SetAttributeValue("charge impact damage increased",math.min(1+(9*purchased[value]),37))
		elseif upgrade == "{ U } <흑기사>적중시 죽음의표식" then
			activator:SetAttributeValue("Reload time increased",66)
			activator:SetAttributeValue("mark for death",1)
		elseif upgrade == "{ U } <흑기사>체력 추가증가" then
			activator:SetAttributeValue("Reload time increased",66)
			activator:SetAttributeValue("max health additive penalty",math.min(0+(75*purchased[value]),300))
		elseif upgrade == "【 EP 】 <흑기사>적중시 이속감소" then
			activator:SetAttributeValue("Reload time increased",66)
			activator:SetAttributeValue("damage bonus HIDDEN",1.1)
			activator:SetAttributeValue("add attributes on hit","move speed penalty|0.35|4|")
		elseif upgrade == "【 EP 】 <흑기사>처치시 3초치명타" then
			activator:SetAttributeValue("Reload time increased",66)
			activator:SetAttributeValue("minicrits become crits",1)
			activator:SetAttributeValue("critboost on kill",3.3)
		elseif upgrade == "【 EP 】 <흑기사>치명타피해 증가" then
			activator:SetAttributeValue("Reload time increased",66)
			activator:SetAttributeValue("mult crit dmg",1.2)
		--(점착)
		elseif upgrade == "( R ) <점착>적에게 붙는 점착" then
			activator:SetAttributeValue("maxammo primary reduced",-20)
			activator:SetAttributeValue("stickybomb stick to enemies",1)
			activator:SetAttributeValue("maxammo secondary reduced",1.5)
		elseif upgrade == "【 EP 】 <점착>점착 바로충전[순삭점착고장]" then
			activator:SetAttributeValue("maxammo primary reduced",-20)
			activator:SetAttributeValue("stickybomb charge rate",0.01)
		--(유탄)
		elseif upgrade == "( R ) <유탄>유탄 벽 충돌시 폭팔" then
			activator:SetAttributeValue("grenade explode on impact",1)
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("maxammo primary reduced",1.5)
		elseif upgrade == "【 EP 】 <유탄>유탄 이중발사" then
			activator:SetAttributeValue("mult projectile count",2)
			activator:SetAttributeValue("projectile spread angle penalty",3)
			activator:SetAttributeValue("fire rate penalty",math.min(1+(0.35*purchased[value]),1.35))
		--(유탄,점착)
		elseif upgrade == "{ U } <유탄/점착>적 방어력 감소" then
			activator:SetAttributeValue("add attributes on hit","dmg taken increased|1.2|4.4|")
		elseif upgrade == "【 EP 】 <유탄/점착>폭팔범위 대폭증가" then
			activator:SetAttributeValue("Blast radius decreased",math.min(1+(1.8*purchased[value]),2.8))
		--(공용)
		elseif upgrade == "( R ) <방패>돌격 완전제어" then
			activator:SetAttributeValue("full charge turn control",1)
			activator:SetAttributeValue("mult charge turn control",11)
		elseif upgrade == "{ U } 데미지 추가증가[데모맨1]" then
			activator:SetAttributeValue("damage penalty",1.15)
		elseif upgrade == "【 EP 】 데미지 추가증가[데모맨2]" then
			activator:SetAttributeValue("dmg penalty vs players",1.2)
		elseif upgrade == "【 EP 】 데미지 추가증가[데모맨3]" then
			activator:SetAttributeValue("CARD: damage bonus",1.2)
		elseif upgrade == "【 ??! 】 거대화/체력증가[유탄/점착점프 불가능]" then
			activator:SetAttributeValue("model scale",1.62)
			activator:SetAttributeValue("rocket jump damage reduction",1000)
			activator:SetAttributeValue("is miniboss",1)
			activator:SetAttributeValue("mult max health",5.43)
			activator:SetAttributeValue("move speed penalty",0.55)
			activator:SetAttributeValue("patient overheal penalty",0.5)
		--(감염된 테란)
		--elseif upgrade == "응애" then
			--activator:SetAttributeValue("clip size penalty",-90)
			--activator:SetAttributeValue("damage bonus HIDDEN",100)
			--activator:SetAttributeValue("Blast radius decreased",5)
			--activator:SetAttributeValue("use large smoke explosion",1)
			--activator:SetAttributeValue("dmg taken from self reduced",111)
			--activator:SetAttributeValue("dmg falloff decreased",0.1)
			
		--헤비(기본)
		--elseif upgrade == "전력을 다해라 버러지들아!!!" then
			--activator:SetAttributeValue("kb fall min velocity",1)
			--activator:SetAttributeValue("kb fall damage",50)
			--activator:SetAttributeValue("kb fall radius",230)
			--activator:SetAttributeValue("kb fall stun time",0.01)
			--activator:SetAttributeValue("kb fall force",100)
		elseif upgrade == "( R ) <미니건>미니건피해량5%증가" then
			activator:SetAttributeValue("damage bonus",math.min(1+(0.05*purchased[value]),1.2))
			activator:SetAttributeValue("maxammo secondary reduced",-20)
		elseif upgrade == "【 EP 】 거대화/체력증가" then
			activator:SetAttributeValue("model scale",1.62)
			activator:SetAttributeValue("is miniboss",1)
			activator:SetAttributeValue("mult max health",4)
			activator:SetAttributeValue("move speed penalty",0.55)
			activator:SetAttributeValue("patient overheal penalty",0.5)
		elseif upgrade == "【 EP 】 헤드샷 활성화/집탄률MAX" then
			activator:SetAttributeValue("can headshot",1)
			activator:SetAttributeValue("weapon spread bonus",0)
		elseif upgrade == "【 EP 】 K-6 중기관총[처참한공속/깡추뎀]" then
			activator:SetAttributeValue("CARD: damage bonus",3.5)
			activator:SetAttributeValue("fire rate penalty",3.3)
		elseif upgrade == "【 EP 】 데미지 추가증가[헤비1]" then
			activator:SetAttributeValue("damage penalty",1.2)
		elseif upgrade == "【 EP 】 스펙트럴 서치 아이[태고의 힘]" then
			activator:SetAttributeValue("damage bonus HIDDEN",1.2)
			activator:SetAttributeValue("turn to gold",1)
			activator:SetAttributeValue("sniper fires tracer",1)
			activator:SetAttributeValue("projectile trail particle","eyeboss_projectile")
		--(특수탄)
		elseif upgrade == "【 EP 】 <미니건>Triple Rocket" then
			activator:SetAttributeValue("add cond on hit",0)
			activator:SetAttributeValue("add cond on hit duration",0)
			activator:SetAttributeValue("no damage falloff",0)
			activator:SetAttributeValue("apply look velocity on damage",0)
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("override projectile type extra","")
			activator:SetAttributeValue("override projectile type",2)
			activator:SetAttributeValue("Projectile speed increased",1)
			activator:SetAttributeValue("mult projectile count",3)
			activator:SetAttributeValue("fire rate penalty HIDDEN",2)
			activator:SetAttributeValue("projectile spread angle penalty",2.2)
			activator:SetAttributeValue("dmg penalty vs players",2.1)
			activator:SetAttributeValue("energy weapon penetration",1)
			activator:SetAttributeValue("projectile no deflect",1)
			activator:SetAttributeValue("add damage per target",0.08)
			activator:SetAttributeValue("Blast radius increased",1.3)
			activator:SetAttributeValue("rocket specialist",1*purchased[value])
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("mult smack time",10)
			activator:SetAttributeValue("stun on damage",0)
			activator:SetAttributeValue("set turn to ice",0)
			activator:SetAttributeValue("add attributes on hit","")
		elseif upgrade == "【 EP 】 <미니건>4중 디버프탄환" then
			activator:SetAttributeValue("add cond on hit",27*256 + 24*65536)
			activator:SetAttributeValue("add cond on hit duration",0)
			activator:SetAttributeValue("no damage falloff",0)
			activator:SetAttributeValue("apply look velocity on damage",0)
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("override projectile type extra","")
			activator:SetAttributeValue("override projectile type",0)
			activator:SetAttributeValue("Projectile speed increased",0)
			activator:SetAttributeValue("mult projectile count",1)
			activator:SetAttributeValue("fire rate penalty HIDDEN",1)
			activator:SetAttributeValue("projectile spread angle penalty",0)
			activator:SetAttributeValue("dmg penalty vs players",0.3)
			activator:SetAttributeValue("energy weapon penetration",1)
			activator:SetAttributeValue("projectile no deflect",1)
			activator:SetAttributeValue("add damage per target",0)
			activator:SetAttributeValue("Blast radius increased",0)
			activator:SetAttributeValue("rocket specialist",0*purchased[value])
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("mult smack time",0.1)
			activator:SetAttributeValue("stun on damage",0)
			activator:SetAttributeValue("set turn to ice",0)
			activator:SetAttributeValue("add attributes on hit","dmg penalty vs players|0.5|4.4|fire rate penalty|2|4.4|")
		elseif upgrade == "【 EP 】 <미니건>K-4 고속유탄기관총" then
			activator:SetAttributeValue("add cond on hit",0)
			activator:SetAttributeValue("add cond on hit duration",0)
			activator:SetAttributeValue("no damage falloff",0)
			activator:SetAttributeValue("apply look velocity on damage",0)
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("override projectile type extra","")
			activator:SetAttributeValue("override projectile type",2)
			activator:SetAttributeValue("Projectile speed increased",1)
			activator:SetAttributeValue("mult projectile count",1)
			activator:SetAttributeValue("fire rate penalty HIDDEN",1.22)
			activator:SetAttributeValue("projectile spread angle penalty",0.5)
			activator:SetAttributeValue("dmg penalty vs players",5.05)
			activator:SetAttributeValue("energy weapon penetration",1)
			activator:SetAttributeValue("projectile no deflect",1)
			activator:SetAttributeValue("add damage per target",0.04)
			activator:SetAttributeValue("Blast radius increased",3.5)
			activator:SetAttributeValue("rocket specialist",0*purchased[value])
			activator:SetAttributeValue("projectile gravity",700)
			activator:SetAttributeValue("mult smack time",10)
			activator:SetAttributeValue("stun on damage",0)
			activator:SetAttributeValue("set turn to ice",0)
			activator:SetAttributeValue("add attributes on hit","")
		elseif upgrade == "【 EP 】 <미니건>뎀증영향없는합선기탄" then
			activator:SetAttributeValue("add cond on hit",0)
			activator:SetAttributeValue("add cond on hit duration",0)
			activator:SetAttributeValue("no damage falloff",0)
			activator:SetAttributeValue("apply look velocity on damage",0)
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("override projectile type extra","mechanicalarmorb")
			activator:SetAttributeValue("override projectile type",0)
			activator:SetAttributeValue("Projectile speed increased",1.25)
			activator:SetAttributeValue("mult projectile count",2)
			activator:SetAttributeValue("fire rate penalty HIDDEN",1.13)
			activator:SetAttributeValue("projectile spread angle penalty",0)
			activator:SetAttributeValue("dmg penalty vs players",1)
			activator:SetAttributeValue("energy weapon penetration",1)
			activator:SetAttributeValue("projectile no deflect",1)
			activator:SetAttributeValue("add damage per target",0)
			activator:SetAttributeValue("Blast radius increased",0)
			activator:SetAttributeValue("rocket specialist",0*purchased[value])
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("mult smack time",0)
			activator:SetAttributeValue("stun on damage",0)
			activator:SetAttributeValue("set turn to ice",0)
			activator:SetAttributeValue("add attributes on hit","")
		elseif upgrade == "【 EP 】 <미니건>수속성 빙결탄환" then
			activator:SetAttributeValue("add cond on hit",0)
			activator:SetAttributeValue("add cond on hit duration",0)
			activator:SetAttributeValue("no damage falloff",0)
			activator:SetAttributeValue("apply look velocity on damage",0)
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("override projectile type extra","")
			activator:SetAttributeValue("override projectile type",0)
			activator:SetAttributeValue("Projectile speed increased",0)
			activator:SetAttributeValue("mult projectile count",1)
			activator:SetAttributeValue("fire rate penalty HIDDEN",1)
			activator:SetAttributeValue("projectile spread angle penalty",0)
			activator:SetAttributeValue("dmg penalty vs players",0.45)
			activator:SetAttributeValue("energy weapon penetration",1)
			activator:SetAttributeValue("projectile no deflect",1)
			activator:SetAttributeValue("add damage per target",0)
			activator:SetAttributeValue("Blast radius increased",0)
			activator:SetAttributeValue("rocket specialist",0*purchased[value])
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("mult smack time",0.1)
			activator:SetAttributeValue("stun on damage",100)
			activator:SetAttributeValue("set turn to ice",1)
			activator:SetAttributeValue("add attributes on hit","move speed penalty|0.28|2|")
		elseif upgrade == "【 ??! 】 <미니건>끌어당기는 그래플탄" then
			activator:SetAttributeValue("add cond on hit",126)
			activator:SetAttributeValue("add cond on hit duration",0.1)
			activator:SetAttributeValue("no damage falloff",1)
			activator:SetAttributeValue("apply look velocity on damage",-150)
			activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("override projectile type extra","")
			activator:SetAttributeValue("override projectile type",0)
			activator:SetAttributeValue("Projectile speed increased",0)
			activator:SetAttributeValue("mult projectile count",1)
			activator:SetAttributeValue("fire rate penalty HIDDEN",1)
			activator:SetAttributeValue("projectile spread angle penalty",0)
			activator:SetAttributeValue("dmg penalty vs players",1.2)
			activator:SetAttributeValue("energy weapon penetration",1)
			activator:SetAttributeValue("projectile no deflect",1)
			activator:SetAttributeValue("add damage per target",0)
			activator:SetAttributeValue("Blast radius increased",0)
			activator:SetAttributeValue("rocket specialist",0*purchased[value])
			activator:SetAttributeValue("projectile gravity",0)
			activator:SetAttributeValue("mult smack time",0)
			activator:SetAttributeValue("stun on damage",0)
			activator:SetAttributeValue("set turn to ice",0)
			activator:SetAttributeValue("add attributes on hit","")
		--샷비
		elseif upgrade == "<샷비>샷건:자동 산탄중화기" then
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("maxammo primary reduced",-20)
			activator:SetAttributeValue("mult smack time",10)
			activator:SetAttributeValue("hit self on miss",1)
			activator:SetAttributeValue("maxammo secondary reduced",1.75)
			activator:SetAttributeValue("faster reload rate",0)
			activator:SetAttributeValue("major move speed bonus",1.3)
		elseif upgrade == "( R ) <샷비>샷건피해량25%증가" then
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("maxammo primary reduced",-20)
			activator:SetAttributeValue("mult smack time",10)
			activator:SetAttributeValue("hit self on miss",1)
			activator:SetAttributeValue("damage bonus",math.min(1+(0.25*purchased[value]),2))
		elseif upgrade == "{ U } <샷비>샷건 공속증가" then
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("maxammo primary reduced",-20)
			activator:SetAttributeValue("mult smack time",10)
			activator:SetAttributeValue("hit self on miss",1)
			activator:SetAttributeValue("fire rate penalty HIDDEN",math.min(1+(-0.23*purchased[value]),0.77))
		elseif upgrade == "【 EP 】 <샷비>부대지원 효과 무시/추뎀" then
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("maxammo primary reduced",-20)
			activator:SetAttributeValue("mult smack time",10)
			activator:SetAttributeValue("hit self on miss",1)
			activator:SetAttributeValue("dmg pierces resists absorbs",1)
			activator:SetAttributeValue("dmg penalty vs players",1.2)
		elseif upgrade == "【 EP 】 <샷비>적 공속감소 디버프효과" then
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("maxammo primary reduced",-20)
			activator:SetAttributeValue("mult smack time",10)
			activator:SetAttributeValue("hit self on miss",1)
            activator:SetAttributeValue("add attributes on hit","fire rate penalty HIDDEN|2|3.5|")
			
		--엔지(근본)
		elseif upgrade == "<<중요>>미션만들기 스타터팩" then
            activator:SetAttributeValue("damage bonus",55)
            activator:SetAttributeValue("melee cleave attack",1)
			activator:SetAttributeValue("melee bounds multiplier",6)
			activator:SetAttributeValue("melee range multiplier",3)
            activator:SetAttributeValue("bullets per shot bonus",6)
            activator:SetAttributeValue("move speed bonus",20)
            activator:SetAttributeValue("dmg taken from blast reduced",0.25)
			activator:SetAttributeValue("dmg taken from fire reduced",0.25)
			activator:SetAttributeValue("dmg taken from bullets reduced",0.25)
			activator:SetAttributeValue("dmg taken from crit reduced",0.1)
			activator:SetAttributeValue("mult credit collect range",100)
			activator:SetAttributeValue("air dash count",20)
            activator:SetAttributeValue("maxammo metal increased",10)
            activator:SetAttributeValue("engy building health bonus",111)
            activator:SetAttributeValue("engy dispenser radius increased",10)
            activator:SetAttributeValue("mvm sentry ammo",55)
            activator:SetAttributeValue("engy disposable sentries",4)
            activator:SetAttributeValue("metal regen",1111)
            activator:SetAttributeValue("upgrade rate decrease",8)
            activator:SetAttributeValue("build rate bonus",0.01)
            activator:SetAttributeValue("engy sentry fire rate increased",0.8)
            activator:SetAttributeValue("fire rate bonus",0.4)
            activator:SetAttributeValue("metal_pickup_decreased",5)
            activator:SetAttributeValue("Repair rate increased",3)
            activator:SetAttributeValue("max health additive penalty",49875)
            activator:SetAttributeValue("model scale",0.99)
			activator:SetAttributeValue("is miniboss",1)
			activator:SetAttributeValue("dmg bonus vs buildings",2.2)
			activator:SetAttributeValue("restore health on kill",75)
			activator:SetAttributeValue("damage force reduction",0.01)
			activator:SetAttributeValue("sentry rapid fire",1)
			activator:SetAttributeValue("engy sentry fire rate increased",0.8)
			activator:SetAttributeValue("engy sentry damage bonus",111)
			activator:SetAttributeValue("dmg pierces resists absorbs",1)
		elseif upgrade == "<렌치>센트리공속/엔지공속 증가" then
			activator:SetAttributeValue("damage bonus",0.2)
			activator:SetAttributeValue("fire rate bonus",math.min(1+(-0.1*purchased[value]),0.9))
			activator:SetAttributeValue("engy sentry fire rate increased",math.min(1+(-0.05*purchased[value]),0.95))
		elseif upgrade == "<렌치>금속얻는양 증가" then
			activator:SetAttributeValue("damage bonus",0.2)
			activator:SetAttributeValue("metal_pickup_decreased",math.min(1+(0.25*purchased[value]),2))
		elseif upgrade == "( R ) <렌치>건물크기증가/막자강화" then
			activator:SetAttributeValue("damage bonus",0.2)
			activator:SetAttributeValue("building scale",1.15)
			activator:SetAttributeValue("Construction rate increased",1.7)
			activator:SetAttributeValue("dmg bonus vs buildings",2.2)
		elseif upgrade == "( R ) <렌치>렌치/구조대원 효율강화" then
			activator:SetAttributeValue("damage bonus",0.2)
			activator:SetAttributeValue("Repair rate increased",math.min(1+(0.55*purchased[value]),2.65))
			activator:SetAttributeValue("mult projectile count",math.min(1+(2*purchased[value]),7))
			activator:SetAttributeValue("faster reload rate",math.min(1+(-0.2*purchased[value]),0.8))
			activator:SetAttributeValue("projectile spread angle penalty",0.15)
		elseif upgrade == "( R ) <렌치>3레벨센트리 로켓특화" then
			activator:SetAttributeValue("damage bonus",0.2)
			activator:SetAttributeValue("rocket specialist",1*purchased[value])
			activator:SetAttributeValue("projectile no deflect",1)
		elseif upgrade == "{ U } <렌치>센트리로켓 공속증가" then
			activator:SetAttributeValue("damage bonus",0.2)
			activator:SetAttributeValue("mult firerocket rate",math.max(1-(0.22*purchased[value]),0.12))
		elseif upgrade == "{ U } <렌치>센트리 데미지증가" then
			activator:SetAttributeValue("damage bonus",0.2)
			activator:SetAttributeValue("engy sentry damage bonus",math.min(1+(0.2*purchased[value]),1.6))
		elseif upgrade == "【 EP 】 <렌치>센트리 고강화" then
			activator:SetAttributeValue("damage bonus",0.2)
			activator:SetAttributeValue("dmg penalty vs players",2)
		elseif upgrade == "【 EP 】 <렌치>엔지니어 은신" then
			activator:SetAttributeValue("damage bonus",0.2)
			activator:SetAttributeValue("add cond when active",64)
		elseif upgrade == "【 EP 】 <렌치>적중시 적 데미지감소" then
			activator:SetAttributeValue("damage bonus",0.2)
			activator:SetAttributeValue("add attributes on hit","damage penalty|0.55|4.2|")
		--(전투)
		elseif upgrade == "<총잡이>센트리/엔지 피해량증가" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("damage bonus",math.min(1+(0.25*purchased[value]),2))
		elseif upgrade == "<총잡이>투사체속도/엔지공속 증가" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("fire rate bonus",math.min(1+(-0.1*purchased[value]),0.9))
			activator:SetAttributeValue("Projectile speed increased",math.min(1+(0.25*purchased[value]),2))
		elseif upgrade == "( R ) <총잡이>총잡이착용시 로켓센트리" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("upgrade rate decrease",2)
			activator:SetAttributeValue("max health additive penalty",25)
			activator:SetAttributeValue("build rate bonus",0.45)
			activator:SetAttributeValue("mult teleporter recharge rate",0.65)
			activator:SetAttributeValue("reload full clip at once",1)
			activator:SetAttributeValue("projectile no deflect",1)
		elseif upgrade == "( R ) <총잡이>발사탄환 +15%증가" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("bullets per shot bonus",math.min(1+(0.15*purchased[value]),1.3))
		elseif upgrade == "( R ) <총잡이>샷건특화/데미지증가" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("damage penalty",1.1)
			activator:SetAttributeValue("projectile penetration",1)
		elseif upgrade == "{ U } <총잡이>데미지 추가증가[1]" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("CARD: damage bonus",1.2)
		elseif upgrade == "{ U } <총잡이>총잡이센트리 강화" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("Blast radius decreased",math.min(1+(0.25*purchased[value]),1.75))
			activator:SetAttributeValue("projectile acceleration",math.min(1+(4444*purchased[value]),13333))
			activator:SetAttributeValue("rocket specialist",1*purchased[value])
		elseif upgrade == "【 EP 】 <총잡이>주무기/권총 폭팔성 탄환" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("explosive bullets",147)
			activator:SetAttributeValue("add damage per target",0.07)
		elseif upgrade == "【 EP 】 <총잡이>헤드샷 활성화/집탄률MAX" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("can headshot",1)
			activator:SetAttributeValue("weapon spread bonus",0)
		elseif upgrade == "【 EP 】 <총잡이>부대지원 효과 무시/뎀증" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("damage bonus HIDDEN",1.2)
			activator:SetAttributeValue("dmg pierces resists absorbs",1)
		elseif upgrade == "【 ??! 】 <총잡이>체력이 적을수록 데미지증가" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("mult dmg with reduced health",2.5)
		elseif upgrade == "【 ??! 】 <총잡이>체력이 16% 미만일때 치명타공격" then
			activator:SetAttributeValue("mod wrench builds minisentry",1)
			activator:SetAttributeValue("disable wrangler shield",1)
			activator:SetAttributeValue("sentry bullet weapon","tf_weapon_rocketlauncher")
			activator:SetAttributeValue("building max level",2)
			activator:SetAttributeValue("engy sentry fire rate increased",5.45)
			activator:SetAttributeValue("mult crit when health is below percent",0.15)
		--(공용)
		elseif upgrade == "( R ) 텔레포터 고강화" then
			activator:SetAttributeValue("mod teleporter speed boost",1)
			activator:SetAttributeValue("mult teleporter recharge rate",0.01)
			activator:SetAttributeValue("bidirectional teleport",1)
		elseif upgrade == "【 EP 】 기계 혁명[태고의 힘]" then
			activator:SetAttributeValue("sentry rapid fire",1)
			activator:SetAttributeValue("mult dmg vs giants",1.2)
			activator:SetAttributeValue("mult dmg vs tanks",1.2)
			activator:SetAttributeValue("turn to gold",1)
			activator:SetAttributeValue("sniper fires tracer",1)
			activator:SetAttributeValue("projectile trail particle","eyeboss_projectile")
			activator:SetAttributeValue("building color rgb",202020)
		elseif upgrade == "【 ??! 】 팀킬활성화를 댓가로 센트리고강화" then
			activator:SetAttributeValue("always crit",1)
			activator:SetAttributeValue("crits_become_minicrits",1)
			activator:SetAttributeValue("receive friendly fire",1)
			activator:SetAttributeValue("allow friendly fire",1)
			
		--메딕
		elseif upgrade == "( R ) 모든근접 비타톱 능력 카피" then
			activator:SetAttributeValue("ubercharge_preserved_on_spawn_max",0.6)
		elseif upgrade == "( R ) 모든무기도발시 광역힐" then
			activator:SetAttributeValue("enables aoe heal",1)
			activator:SetAttributeValue("gesture speed increase",1.18)
		elseif upgrade == "{ U } 우버차지 충전속도 증가" then
			activator:SetAttributeValue("ubercharge rate penalty",3.5)
		elseif upgrade == "{ U } <예방접종기>활성화된 저항유형 100%저항" then
			activator:SetAttributeValue("medigun bullet resist passive",1)
			activator:SetAttributeValue("medigun blast resist passive",1)
			activator:SetAttributeValue("medigun fire resist passive",1)
		elseif upgrade == "{ ?? } 메딕 데미지대폭감소/은폐활성화" then
			activator:SetAttributeValue("add cond when active",64)
			activator:SetAttributeValue("damage bonus HIDDEN",0.2)
		elseif upgrade == "{ U } 힐 대상자에게 20%데미지증가부여" then
			activator:SetAttributeValue("medigun passive attributes","mod medic healed damage bonus|1.2|")
			activator:SetAttributeValue("medigun passive attributes owner","move speed penalty|1.5|")
		elseif upgrade == "【 EP 】 아포칼립스[태고의 힘]" then
			activator:SetAttributeValue("model scale",1.62)
			activator:SetAttributeValue("mult max health",3.67)
			activator:SetAttributeValue("is miniboss",1)
			activator:SetAttributeValue("damage penalty",1.2)
			activator:SetAttributeValue("major move speed bonus",0.7)
			activator:SetAttributeValue("damage force reduction",0.01)
			activator:SetAttributeValue("dmg taken increased",0.2)
			activator:SetAttributeValue("turn to gold",1)
			activator:SetAttributeValue("sniper fires tracer",1)
			activator:SetAttributeValue("projectile trail particle","eyeboss_projectile")
		--보조
		elseif upgrade == "( R ) 치료(물리)[주사기총/십자군쇠뇌 강화]" then
		    activator:SetAttributeValue("ignores other projectiles",1)
			activator:SetAttributeValue("projectile spread angle penalty",1.5)
			activator:SetAttributeValue("mult projectile count",4)
		elseif upgrade == "{ U } <특성/중첩안됨>적중시 미치광이우유" then
			activator:SetAttributeValue("add cond on hit",27)
		elseif upgrade == "{ U } <특성/중첩안됨>적중시 병수도" then
			activator:SetAttributeValue("add cond on hit",24)
		elseif upgrade == "{ U } 데미지 추가증가[메딕1]" then
			activator:SetAttributeValue("dmg penalty vs players",1.11)
		elseif upgrade == "{ U } 적 적중시 적 공속감소" then
			activator:SetAttributeValue("add attributes on hit","fire rate penalty HIDDEN|2|3.5|")
		elseif upgrade == "【 EP 】 데미지 추가증가[메딕2]" then
			activator:SetAttributeValue("CARD: damage bonus",1.22)
		--???
		--elseif upgrade == "test1" then
			--activator:SetAttributeValue("medigun passive attributes","damage force reduction|-2|")
			--activator:SetAttributeValue("medigun blast resist passive",1)
			--activator:SetAttributeValue("medigun fire resist passive",1)
		--elseif upgrade == "테스트" then
			--activator:SetAttributeValue("medigun charge is crit boost",1)
		--elseif upgrade == "【 SSR 】 적중 시 화상/우유/자라테 효과 부여" then
			--activator:SetAttributeValue("add cond on hit",123 + 27*256 + 24*65536) --123 = gas, 27 = milk, 24 = jarate, total is 1579899
			--activator:SetAttributeValue("add cond on hit duration",10)
			--activator:SetAttributeValue("bleeding duration",10)
			
		--스나이퍼(활)
		elseif upgrade == "( R ) <헌츠맨>활 탄약/체력증가" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("max health additive penalty",50)
			activator:SetAttributeValue("maxammo primary reduced",2)
		elseif upgrade == "( R ) <헌츠맨>약한화살2개[관통찍으면 ㅈ됨]" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("arrow mastery",math.min(0+(1*purchased[value]),3))
		elseif upgrade == "( R ) <헌츠맨>화살 조종가능" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("mod projectile heat follow crosshair",1)
			activator:SetAttributeValue("mod projectile heat aim start time",0)
			activator:SetAttributeValue("mod projectile heat seek power",540)
			activator:SetAttributeValue("mod projectile heat aim error",1)
			activator:SetAttributeValue("mod projectile heat no predict target speed",0)
			activator:SetAttributeValue("mod projectile heat aim time",0)
		elseif upgrade == "{ U } <헌츠맨>활 데미지증가" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("damage penalty",1.2)
		elseif upgrade == "【 EP 】 <헌츠맨>적 추적화살" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("mod projectile heat follow crosshair",0)
			activator:SetAttributeValue("mod projectile heat aim start time",0.1)
			activator:SetAttributeValue("mod projectile heat seek power",270)
			activator:SetAttributeValue("mod projectile heat aim error",90)
			activator:SetAttributeValue("mod projectile heat no predict target speed",1)
			activator:SetAttributeValue("mod projectile heat aim time",1.25)
		elseif upgrade == "【 EP 】 <헌츠맨>추가메인화살[관통찍으면 ㅈ됨]" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("mult projectile count",math.min(1+(1*purchased[value]),2))
			activator:SetAttributeValue("projectile spread angle penalty",math.min(1+(1*purchased[value]),2))
		elseif upgrade == "【 EP 】 <헌츠맨>체력추가증가" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("mult max health",1.95)
			activator:SetAttributeValue("move speed as health decreases",2)
		--(SMG)
		elseif upgrade == "<SMG>SMG공속증가" then
			activator:SetAttributeValue("fire rate bonus",math.min(1+(-0.1*purchased[value]),0.9))
			activator:SetAttributeValue("maxammo primary reduced",-20)
		elseif upgrade == "( R ) <SMG>체력증가/헤드샷활성/추뎀" then
			activator:SetAttributeValue("can headshot",1)
			activator:SetAttributeValue("max health additive penalty",75)
			activator:SetAttributeValue("damage penalty",1.2)
			activator:SetAttributeValue("maxammo primary reduced",-20)
		elseif upgrade == "( R ) <SMG>관통탄환" then
			activator:SetAttributeValue("projectile penetration",1)
			activator:SetAttributeValue("maxammo primary reduced",-20)
		elseif upgrade == "( R ) <SMG>집탄율MAX" then
			activator:SetAttributeValue("weapon spread bonus",0)
			activator:SetAttributeValue("maxammo primary reduced",-20)
		elseif upgrade == "{ U } <SMG>K15 경기관총" then
			activator:SetAttributeValue("clip size penalty",3)
			activator:SetAttributeValue("maxammo secondary reduced",4)
			activator:SetAttributeValue("maxammo primary reduced",-20)
		elseif upgrade == "{ U } <SMG>SMG 공격속도 추가증가" then
			activator:SetAttributeValue("fire rate penalty HIDDEN",0.88)
			activator:SetAttributeValue("maxammo primary reduced",-20)
		elseif upgrade == "{ U } <SMG>탄환개조" then
			activator:SetAttributeValue("maxammo primary reduced",-20)
			activator:SetAttributeValue("no damage falloff",1)
		elseif upgrade == "【 EP 】 <SMG>SMG 폭팔성 탄환" then
			activator:SetAttributeValue("explosive bullets",147)
			activator:SetAttributeValue("add damage per target",0.07)
			activator:SetAttributeValue("maxammo primary reduced",-20)
		elseif upgrade == "【 EP 】 <SMG>이중사격" then
			activator:SetAttributeValue("bullets per shot bonus",2)
			activator:SetAttributeValue("maxammo primary reduced",-20)
		--(근본)
		elseif upgrade == "( R ) <저격총>저격총 데미지증가" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("projectile penetration",1)
			activator:SetAttributeValue("damage penalty",1.2)
		elseif upgrade == "( R ) <저격총>헤드샷폭팔 +1증가" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("projectile penetration",1)
			activator:SetAttributeValue("explosive sniper shot",math.min(0+(1*purchased[value]),4))
		elseif upgrade == "{ U } <저격총>저격총 개조" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("projectile penetration",1)
			activator:SetAttributeValue("ability master sniper",math.min(0+(1*purchased[value]),2))
		elseif upgrade == "【 EP 】 <저격총>저격총게이지 풀차칭시 추뎀" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("projectile penetration",1)
			activator:SetAttributeValue("sniper full charge damage bonus",1.5)
		--(활/저격총)
		elseif upgrade == "【 ??! 】 <활/저격총>느려터진공속/깡추뎀" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("fire rate penalty HIDDEN",3.3)
			activator:SetAttributeValue("dmg penalty vs players",2.5)
		elseif upgrade == "【 EP 】 <활/저격총>주무기 공속증가" then
			activator:SetAttributeValue("maxammo secondary reduced",-20)
			activator:SetAttributeValue("fire rate bonus",0.8)
		--(패시브)
		elseif upgrade == "{ U } <패시브/중첩안됨>적중시 적 이속감소" then
			activator:SetAttributeValue("add attributes on hit","move speed penalty|0.44|4|")
		elseif upgrade == "{ U } <패시브/중첩안됨>적중시 적 뎀감소" then
			activator:SetAttributeValue("add attributes on hit","CARD: damage bonus|0.75|4|")
		elseif upgrade == "【 EP 】 <패시브/중첩안됨>적중시 적 방깎" then
			activator:SetAttributeValue("add attributes on hit","dmg taken increased|1.28|4|")
		--(공용)
		elseif upgrade == "【 EP 】 부대지원 효과 무시/데미지증가" then
			activator:SetAttributeValue("dmg pierces resists absorbs",1)
			activator:SetAttributeValue("CARD: damage bonus",1.2)
		elseif upgrade == "【 EP 】 황혼의 날개[태고의 힘]" then
			activator:SetAttributeValue("mult crit dmg",1.15)
			activator:SetAttributeValue("turn to gold",1)
			activator:SetAttributeValue("sniper fires tracer",1)
			activator:SetAttributeValue("projectile trail particle","eyeboss_projectile")
			
		--스파이(근본)
		elseif upgrade == "( R ) <백스텝>스카웃능력카피/돈수집시과치료" then
			activator:SetAttributeValue("mult credit collect range",4)
			activator:SetAttributeValue("health from credits",45)
			activator:SetAttributeValue("overheal bonus",2)
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("reload time increased HIDDEN",0)
			activator:SetAttributeValue("maxammo secondary reduced",0.3)
			activator:SetAttributeValue("min respawn time",4.4)
			activator:SetAttributeValue("air dash count",1)
		elseif upgrade == "{ U } <백스텝>화상/우유/병수도 면역" then
			activator:SetAttributeValue("afterburn immunity",1)
			activator:SetAttributeValue("wet immunity",1)
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("reload time increased HIDDEN",0)
			activator:SetAttributeValue("maxammo secondary reduced",0.3)
		elseif upgrade == "{ U } <백스텝>소형봇적중시 스턴" then
			activator:SetAttributeValue("stun on damage",600)
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("reload time increased HIDDEN",0)
			activator:SetAttributeValue("maxammo secondary reduced",0.3)
		elseif upgrade == "【 EP 】 <백스텝>은폐시간증가/즉시해제" then
			activator:SetAttributeValue("cloak consume rate decreased",-4)
			activator:SetAttributeValue("mult decloak rate",0.01)
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("reload time increased HIDDEN",0)
			activator:SetAttributeValue("maxammo secondary reduced",0.3)
		elseif upgrade == "【 EP 】 <백스텝>75%확률로 적 공격회피" then
			activator:SetAttributeValue("add cond when active",79)
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("reload time increased HIDDEN",0)
			activator:SetAttributeValue("maxammo secondary reduced",0.3)
		elseif upgrade == "【 EP 】 <백스텝>근접적중시 몇초간무적" then
			activator:SetAttributeValue("melee grants protection",0.6)
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("reload time increased HIDDEN",0)
			activator:SetAttributeValue("maxammo secondary reduced",0.3)
		elseif upgrade == "【 EP 】 <백스텝>체력 추가증가" then
			activator:SetAttributeValue("max health additive penalty",275)
			activator:SetAttributeValue("clip size penalty",0.1)
			activator:SetAttributeValue("reload time increased HIDDEN",0)
			activator:SetAttributeValue("maxammo secondary reduced",0.3)
		--(리볼버)
		elseif upgrade == "( R ) <총파이>데스 바이 리볼버" then
			activator:SetAttributeValue("cannot disguise",1)
			activator:SetAttributeValue("cannot be backstabbed",1)
			activator:SetAttributeValue("clip size penalty",1.25)
			activator:SetAttributeValue("maxammo secondary reduced",2.35)
			activator:SetAttributeValue("max health additive penalty",75)
			activator:SetAttributeValue("damage bonus HIDDEN",1.16)
			activator:SetAttributeValue("no damage falloff",1)
		elseif upgrade == "( R ) <총파이>관통탄환 추뎀" then
			activator:SetAttributeValue("cannot disguise",1)
			activator:SetAttributeValue("cannot be backstabbed",1)
			activator:SetAttributeValue("penetration damage penalty",1.2)
		elseif upgrade == "{ U } <총파이>헤드샷활성/헤폭+1" then
			activator:SetAttributeValue("cannot disguise",1)
			activator:SetAttributeValue("cannot be backstabbed",1)
			activator:SetAttributeValue("explosive sniper shot",math.min(0+(1*purchased[value]),3))
			activator:SetAttributeValue("can headshot",1)
		elseif upgrade == "{ U } <총파이>데미지증가/적 공속감소" then
			activator:SetAttributeValue("damage penalty",1.18)
			activator:SetAttributeValue("add attributes on hit","fire rate penalty HIDDEN|2|3.5|")
		elseif upgrade == "【 EP 】 <총파이>리볼버 폭팔성 탄환" then
			activator:SetAttributeValue("cannot disguise",1)
			activator:SetAttributeValue("cannot be backstabbed",1)
			activator:SetAttributeValue("explosive bullets",147)
			activator:SetAttributeValue("add damage per target",0.07)
		elseif upgrade == "【 EP 】 <총파이>이중사격" then
			activator:SetAttributeValue("cannot disguise",1)
			activator:SetAttributeValue("cannot be backstabbed",1)
			activator:SetAttributeValue("bullets per shot bonus",2)
		elseif upgrade == "【 EP 】 <총파이>치명타피해량 추가증가" then
			activator:SetAttributeValue("cannot disguise",1)
			activator:SetAttributeValue("cannot be backstabbed",1)
			activator:SetAttributeValue("mult crit dmg",1.15)
		elseif upgrade == "【 EP 】 <총파이>적중횟수만큼 데미지증가" then
			activator:SetAttributeValue("cannot disguise",1)
			activator:SetAttributeValue("cannot be backstabbed",1)
			activator:SetAttributeValue("extra damage on hit",1.2)
		--(공용)
		elseif upgrade == "{ U } 데미지 추가증가[스파이1]" then
            activator:SetAttributeValue("CARD: damage bonus",1.2)
		elseif upgrade == "【 EP 】 데스 크라이시스[태고의 힘]" then
			activator:SetAttributeValue("dmg penalty vs players",1.2)
			activator:SetAttributeValue("turn to gold",1)
			activator:SetAttributeValue("sniper fires tracer",1)
			activator:SetAttributeValue("projectile trail particle","eyeboss_projectile")
			
			
		end
	elseif attributename ~= "custom" then
		if max ~= nil then
			if increment > 0 then
				activator:SetAttributeValue(attributename,math.min(min+increment*purchased[value],max))
			else
				activator:SetAttributeValue(attributename,math.max(min+increment*purchased[value],max))
			end
		else
			activator:SetAttributeValue(attributename,min+increment*purchased[value])
		end
	end
end

--Give all players specified amount of upgrade points, adds running total to TotalUpgradePoints for late joiners
function AddUpgradePoints(number)
	for _, v in pairs(UniqueAccountIDs) do
		v.UpgradePoints = v.UpgradePoints + number
	end
	TotalUpgradePoints = TotalUpgradePoints + number
end

--Give all players specified amount of rerolls, adds running total to TotalRerollPoints for late joiners
function AddRerollPoints(number)
	for _, v in pairs(UniqueAccountIDs) do
		v.RerollPoints = v.RerollPoints + number
	end
	TotalRerollPoints = TotalRerollPoints + number
end

--Set all players's upgrade points to specified value without adding or subtracting to TotalUpgradePoints
function SetUpgradePoints(number)
	for _, v in pairs(UniqueAccountIDs) do
		v.UpgradePoints = number
	end
end

--Set all players's rerolls to specified value without adding or subtracting to TotalRerollPoints
function SetRerollPoints(number)
	for _, v in pairs(UniqueAccountIDs) do
		v.RerollPoints = number
	end
end

--Iterates upon PurchasedUpgrades table and calls AddUpgrade for each upgrade, called OnSpawn of every player
function ReAddPurchasedUpgrades(activator)
	local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]]
	local class = activator:DumpProperties().m_iClass
	local purchased = player[class].PurchasedUpgrades

	for k, _ in pairs(purchased) do
		AddUpgrade(activator, k)
	end
	activator:RefillAmmo()
end

--[[This function will display the shop menu
	It shows how many upgrade levels were purchased and the max if it exists
	It will also show the corresponding class you are playing as in the title
	Shows how many upgrade points are remaining
	Always adds the reroll option to the bottom of the list
	Will disable the shop if the player has no more upgrade points]]
function ShowUpgradeMenu(activator)
	local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]]
	local class = activator:DumpProperties().m_iClass
	local menu = player[class].UpgradeMenu
	local purchased = player[class].PurchasedUpgrades

	menu[MenuCapacity+1] = {text= classIndices_Internal[class] .. " 상점 새로고침\n    새로고침 " .. player.RerollPoints .. " 번 남음", value="reroll"}
	if player.RerollPoints == 1 then
		menu[MenuCapacity+1] = {text= classIndices_Internal[class] .. " 상점 새로고침\n    새로고침 "  .. player.RerollPoints .. " 번 남음", value="reroll"}
	elseif player.RerollPoints <= 0 then
		menu[MenuCapacity+1] = {text= classIndices_Internal[class] .. " 상점 새로고침\n    새로고침 "  .. player.RerollPoints .. " 번 남음", value="reroll", disabled = true}
	end

	menu.title = classIndices_Internal[class] .. " 상점\n업그레이드를 선택 하세요\n" ..  player.UpgradePoints .. " 업그레이드 포인트 남음\n "
	if player.UpgradePoints == 1 then
		menu.title = classIndices_Internal[class] .. " 상점\n업그레이드를 선택 하세요\n" .. player.UpgradePoints .. " 업그레이드 포인트 남음\n "
	elseif player.UpgradePoints <= 0 then
		for i = 1, MenuCapacity+1, 1 do
			menu[i].disabled = true
		end
	end

	for i = 1, MenuCapacity, 1 do
		local value = menu[i].value
		local upgradetable = {}
		for k in string.gmatch(value, "[^,]+") do
			upgradetable[#upgradetable + 1] = k
		end
		local min = upgradetable[3]
		local increment = upgradetable[4]
		local max = upgradetable[5]

		if purchased[value] ~= nil then
			menu[i].text = menu[i].text .. "\n    #: " .. purchased[value]
		else
			menu[i].text = menu[i].text .. "\n    #: 0"
		end
		if max ~= nil then
			menu[i].text = menu[i].text .. "          Max: " .. math.ceil((max-min)/increment) --big brain math
		end
	end

	activator:DisplayMenu(menu)

	for i = 1, MenuCapacity, 1 do
		local value = menu[i].value
		local upgradetable = {}
		for k in string.gmatch(value, "[^,]+") do
			upgradetable[#upgradetable + 1] = k
		end
		upgrade = upgradetable[1]

		menu[i].text = upgrade
	end
end

function CloseUpgradeMenu(activator) --probably redundnant
	activator:HideMenu()
end

function deepCopy(original) --special thx to https://developer.roblox.com
	local copy = {}
	for k, v in pairs(original) do
		if type(v) == "table" then
			v = deepCopy(v)
		end
		copy[k] = v
	end
	return copy
end

function OnWaveSuccess(wave) --웨이브당 업그레이드 포인트, 리롤 포인트 지급량 설정
	AddUpgradePoints(1) --(4/5/6)/(5/6)
	AddRerollPoints(1) --(2/3/4)/(2/3)
end

function OnWaveReset(wave) --on wave reset, load save state from WaveState
	if WaveState[wave] ~= nil then
		TotalUpgradePoints = WaveState[wave].TotalUpgradePoints
		TotalRerollPoints = WaveState[wave].TotalRerollPoints
		UniqueAccountIDs = deepCopy(WaveState[wave].UniqueAccountIDs)
	end
end

function OnWaveInit(wave) --on wave init, create save state in WaveState, reset rolls
	EnableUpgradeStations() --for wave 1
	if WaveState[wave] == nil then
		WaveState[wave] =
		{
			TotalUpgradePoints = TotalUpgradePoints,
			TotalRerollPoints = TotalRerollPoints,
			UniqueAccountIDs = deepCopy(UniqueAccountIDs)
		}
	end
	ResetRolls()
end