심심해서 스타포스 비용 및 파괴횟수 통계를 내봤습니다.
선데이는 각각 아무것도 없을 때, 30% 할인, 5/10/15 입니다. (마지막은 16파방만 적용)
각 케이스마다 아이템 1,000,000 개를 돌렸습니다.
표 하나당 아이템 총 900만개씩 돌렸다고 보시면 됩니다.
운에 따라(상위 or 하위 1%/10%/30%/50%) 비용 및 파괴횟수가 얼마인지도 나타냈습니다.
재미로 봐주세요.
그리고 그래프도 나타내려고 했으나....
5/10/15일 때 스타캐치, 1516파방(사실상 16), 200제 22성에 대한 그래프입니다.
cpu 온도가 70도를 넘어가기 시작해서 300개로 끝냈습니다.
class Cost(object):
ReqLv140 = {}
ReqLv150 = {}
ReqLv160 = {}
ReqLv200 = {}
Lv = {140 : ReqLv140,
150 : ReqLv150,
160 : ReqLv160,
200 : ReqLv200}
@classmethod
def init(cls):
for i in range(25):
if i < 10:
for key in cls.Lv.keys():
cls.Lv[key][i] = int(1000 + pow(key, 3) * (i + 1) / 25)
elif i < 15:
for key in cls.Lv.keys():
cls.Lv[key][i] = int(1000 + pow(key, 3) * pow(i + 1, 2.7) / 400)
else:
for key in cls.Lv.keys():
cls.Lv[key][i] = int(1000 + pow(key, 3) * pow(i + 1, 2.7) / 200)
class Probability(object):
Success = {}
Destruction = {}
Correction = 10
@classmethod
def init(cls):
for i in range(25):
# Success
if i < 3:
cls.Success[i] = (95 - i * 5) * cls.Correction
elif i < 15:
cls.Success[i] = (100 - i * 5) * cls.Correction
elif i < 22:
cls.Success[i] = (30) * cls.Correction
else:
cls.Success[i] = (25 - i) * cls.Correction
#Destruction
if i < 12:
cls.Destruction[i] = 0 * cls.Correction
elif i == 12:
cls.Destruction[i] = 0.6 * cls.Correction
elif i == 13:
cls.Destruction[i] = 1.3 * cls.Correction
elif i == 14:
cls.Destruction[i] = 1.4 * cls.Correction
elif i < 18:
cls.Destruction[i] = 2.1 * cls.Correction
elif i < 20:
cls.Destruction[i] = 2.8 * cls.Correction
elif i < 22:
cls.Destruction[i] = 7.0 * cls.Correction
elif i == 22:
cls.Destruction[i] = 19.4 * cls.Correction
elif i == 23:
cls.Destruction[i] = 29.4 * cls.Correction
elif i == 24:
cls.Destruction[i] = 39.6 * cls.Correction
class Item(object):
@classmethod
def init(cls):
cls.Number = 0
cls.cost = list()
cls.destruction = list()
cls.count_try = {}
cls.count_success = {}
cls.count_fail = {}
cls.count_destruction = {}
for i in range(25):
cls.count_try[i] = 0
cls.count_success[i] = 0
cls.count_fail[i] = 0
cls.count_destruction[i] = 0
def __init__(self, reqLv = 160, star = 0):
Item.Number += 1
self.number = Item.Number
self.reqLv = reqLv
self.star = star
self.cost = 0
self.decrease_continuous = 0
self.count_try = {}
self.count_success = {}
self.count_fail = {}
self.count_destruction = {}
for i in range(25):
self.count_try[i] = 0
self.count_success[i] = 0
self.count_fail[i] = 0
self.count_destruction[i] = 0
def __del__(self):
Item.cost.append(self.cost)
Item.destruction.append(sum(self.count_destruction.values()))
class Reinforce(object):
@classmethod
def init(cls):
cls.Catch = list()
cls.Protect = list()
cls.DC_30p = False
cls.Bonus_1516 = False
cls.Bonus_until_10 = False
@classmethod
def setting(cls, Catch = None, Protect = None, DC_30p = None, Bonus_1516 = None, Bonus_until_10 = None):
if not Catch == None:
cls.Catch = Catch
if not Protect == None:
cls.Protect = Protect
for p in Protect:
if not p in [12, 13, 14, 15, 16]:
sys.exit('파괴방지 불가능 구간 설정')
check = list()
if not DC_30p == None:
cls.DC_30p = DC_30p
check.append(DC_30p)
if not Bonus_1516 == None:
cls.Bonus_1516 = Bonus_1516
check.append(Bonus_1516)
if not Bonus_until_10 == None:
cls.Bonus_until_10 = Bonus_until_10
check.append(Bonus_until_10)
if check.count(True) > 1:
sys.exit('이벤트가 겹침.')
@classmethod
def run(cls, item):
lv = item.reqLv
star = item.star
cost = Cost.Lv[lv][star]
success = Probability.Success[star]
destroy = Probability.Destruction[star]
if star in cls.Catch:
success *= 1.05
if item.decrease_continuous > 1:
success = 100 * Probability.Correction
if cls.Sunday_51015 and star in [5, 10, 15]:
success = 100 * Probability.Correction
if star in cls.Protect and not success == 100 * Probability.Correction:
destroy = 0
cost *= 2
if cls.Sunday_DC30p:
if star in cls.Protect and not success == 100 * Probability.Correction:
cost *= 0.85
else:
cost *= 0.7
item.cost += cost
nr = np.random.randint(100 * Probability.Correction)
if nr < success:
cls.result(item, 1)
elif nr < success + destroy:
cls.result(item, -1)
else:
cls.result(item, 0)
@classmethod
def result(cls, item, code):
# 1 : Success
# 0 : Failed
# -1 : Destroyed
star = item.star
Item.count_try[star] += 1
item.count_try[star] += 1
if code == 1:
Item.count_success[star] += 1
item.count_success[star] += 1
item.decrease_continuous = 0
if cls.Bonus_until_10 and star < 10:
item.star += 2
else:
item.star += 1
elif code == 0:
Item.count_fail[star] += 1
item.count_fail[star] += 1
if star > 10 and not star in [5, 10, 15, 20]:
item.star -= 1
item.decrease_continuous += 1
else:
item.decrease_continuous = 0
else:
Item.count_destruction[star] += 1
item.count_destruction[star] += 1
item.star = 12
item.decrease_continuous = 0